Question: Python: Calendar Assignment Name your file cal.py and call your function with no input or output values make_calendar 1.Enter into the function a docstring with

Python: Calendar Assignment Name your file cal.py and call your function with no input or output values make_calendar

1.Enter into the function a docstring with a brief explanation of make_calendar and the standard assignment header information.

2. Import time and calendar into your function and use localtime function in time to find the current month and year

3.Ask the user for the year of the calendar. It should default to the current year if nothing is entered. It should warn the user if a string is entered and exit the function. It should

warn the user if the value is not in the range of 1 and 9999 and exit the function.

4.If a 2-digit value is entered for the year the function should enter a while loop to get input of 0 for the year 20xx or 1 for the year xx. The function should keep asking for

input until either a 0 or 1 are entered.

5. Ask the user for the month of the calendar. It should default to the current month if nothing is entered. It should warn the user if a string is entered and exit the function. It

should warn the user if the value is not between 1 and 12 and exit the function.

6. After the input values have been checked use the TextCalendar function in calendar to print out a calendar.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!