Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started