HOW TO MAKE A CALENDAR MAKER TOOL IN PYTHON

INTRODUCTION

 Programming was so easy when it was just following print('Hello, world!') Tutorials. Perhaps you’ve followed a well-structured book or online course for beginners, worked through the exercises, and nodded along with its technical jargon that you (mostly) understood. However, when it came time to leave the nest to write your own  programs, maybe you found it hard to fly on your own. You found yourself staring at a blank editor window and unsure of how to get started writing Python programs of your own. The problem is that following a tutorial is great for learning concepts, but that isn’t necessarily the same thing as learning to create original programs from scratch. The common advice given at this stage is to examine the source code of open source software or to work on your own projects, but open source projects aren’t always well documented or especially accessible to newcomers. And while it’s motivating to work on your own project, you’re left completely without guidance or structure.

 The Program in Action

How

that the get Calendar For () function returns a giant multiline string of the calendar for the given month and year. In this function, the call Text variable stores this string, which adds the lines, spaces, and dates to It's To track the date, the current Date variable holds a date and time. Date The object, which gets set to the next or previous date by adding time and date time delta (*) objects. You can learn about Python’s

After you’ve entered the code and run it a few times, try re-creating this program from scratch without looking at the source code in this book. It doesn’t have to be exactly the same as this program; you can invent your own version! On your own, you can also try to figure out how to do the following:

  • Add text inside some boxes for holidays.
  •  Add text inside some boxes for reoccurring events.
  •  Print a "mini" calendar that has dates without boxes.

 Exploring the Program,

 try to find the answers to the following questions: Experiment with some modifications to the code and rerun the program to see what effect the changes have.

  1.  How can you make the calendar display abbreviated months? For example, show ‘Jan’ instead of ‘January’.
  1.  What error message do you get if you delete or comment out year = int (response) on line 21?
  1.  How can you make the calendar not display the days of the week at the top? 4. How can you make the program not save the calendar to a file?
  1.  How can you make the program not save the calendar to a file?
  2.  What happens if you delete or comment out print (call Text) on line 93?

 

How to Design Small Programs

Programming has proven to be a powerful skill, creating billion-dollar tech companies and amazing technological advances. It’s easy to want to aim high with your own software creations, but biting off more than you can chew can leave you with half-finished programs and frustration. However, you don’t need to be a computer genius to code fun and creative programs. The Python programs in this book follow several design principles to aid new programmers in understanding their source code:
Small,  Most of these programs are limited to 256 lines of code and are often significantly shorter. This size limit makes them easier to comprehend. The choice of 256 is arbitrary, but 256 is also 28, and powers of 2 are lucky programmer numbers. Text based  Text is simpler than graphics. Since the source code and program output are both text, it’s easy to trace the cause and effect between print('Thanks for playing!') In the code, and Thanks for playing! Appearing on the screen. No installation needed,  Each program is self-contained in a single Python source file with the .py file extension, like tictactoe.py. You don’t need to run an installer program, and you can easily post these programs online to share with others. Numerous,  There are 81 programs in this book. Between board games, card games, digital artwork, simulations, mathematical puzzles, mazes, and humor programs, you’re bound to find many things you’ll love. Simple  The programs have been written to be easy to understand by beginners. Whenever I had to choose between writing code using sophisticated, high-performance algorithms or writing plain, straightforward code, I’ve chosen the latter every time.

 

Download Source Code

 

 

 

Enjoyed this article? Stay informed by joining our newsletter!

Comments

You must be logged in to post a comment.

About Author

Hi my name Amit Follow me instagram :- @Amitgajare_official