Question: In python 3, without importing datetime Thanks Q2. In this program, the user is supposed to enter a date in YYYY-MM-DD format. You are required

In python 3, without importing datetime
Thanks
 In python 3, without importing datetime Thanks Q2. In this program,

Q2. In this program, the user is supposed to enter a date in YYYY-MM-DD format. You are required to create a function named isValidDate) with parameters being the year, month and day extracted from the user input. This function uses assertions to check that the year, the month and day are correct. The month should be an integer between 1 and 12. The day should be an integer valid for the days of the corresponding month, up to 29 for February. To keep is simple, let's say the year should be between 1901 and 2020 and the leap year are years divisible by 4 In general, every year that is exactly divisible by four is a leap year, except for years that are exactly divisible by 100, but these centurial years are leap years if they are exactly divisible by 400. For example, the years 1700, 1800, and 1900 are not leap years, but the year 2000 is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!