Question
In this lab, you add the input and output statements to a partially completed Python program. When completed, the user should be able to enter
In this lab, you add the input and output statements to a partially completed Python program. When completed, the user should be able to enter a year, a month, and a day. The program then determines if the date is valid. Valid years are those that are greater than 0, valid months include the values 1 through 12, and valid days include the values 1 through 31.
Instructions
Notice that variables have been declared for you.
Write input statements to retrieve a year, a month, and a day from the user.
Include the print statements to output the following:
month/day/year is a valid date.
or
month/day/year is an invalid date.
Execute the program entering the following input:
month = 5, day = 32 year = 2014
Execute the program entering the following input:
month = 9 day = 21 year = 2002
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