Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

What lessons in OD contracting does this case represent?

Answered: 1 week ago

Question

Does the code suggest how long data is kept and who has access?

Answered: 1 week ago