Question: Write a Python program to read from the user a number between 1 and 12. The number corresponds to the months in a year. The
Write a Python program to read from the user a number between 1 and 12. The number corresponds to the months in a year. The program must print the month. Give an appropriate error message if the user gives the wrong input. Consider January to be the first month.
- Ensure that the program is well documented with comments.
- Use meaningful variable names.
(1:January, 2:February, 3:March, 4:April, 5:May, 6:June, 7:July, 8:August, 9:September, 10:October, 11:November, 12:December)
Examples:
a)
Input: 1 Output: January
b)
Input: 2 Output: February.
c)
Input: 14 Output: Not a month
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
