Question: Write a program called 'printmonth.py' that asks the user for a month name and start day and then prints the calendar for that month
Write a program called 'printmonth.py' that asks the user for a month name and start day and then prints the calendar for that month in a 6 row by 7 column grid. (Ignoring issues of leap years, assume February has 28 days). Your calendar should cater for conditions whereby the user has entered an incorrect name of a month and/or a start date (See the sample 10 below). Sample 10 (The input from the user is shown in bold font-do not program this): Enter the name of a month (e.g. January,..., December): September Enter the start day (1 for Monday, 7 for Sunday) : 4 September Mo Tu We Th Fr Sa Su 1 2 3 4 8 9 10 11 5 6 7 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Sample 10 (The input from the user is shown in bold font-do not program this): Enter the name of a month (e.g. January,..., December): June Enter the start day (1 for Monday, 7 for Sunday): 9 Invalid calendar: you have either entered an incorrect month name or start day. Sample 10 (The input from the user is shown in bold font-do not program this):
Step by Step Solution
3.49 Rating (149 Votes )
There are 3 Steps involved in it
Answer import calendar def printmonthcalendarmonth startday try mon... View full answer
Get step-by-step solutions from verified subject matter experts
