Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 Thanks
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