Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The input to the program is two dates entered by the user. The output is the total elapsed days between the two dates. Here are
The input to the program is two dates entered by the user. The output is the total elapsed days between the two dates. Here are the rest of the function specifications from our design:
def days_in_month(month): """ Calculate number of days in month. month is an int in range(1, 13) representing a month number. Returns the number of days in the month in a non-leap year. """ def day_number(date): """ Calculate the ordinal day number of the date date is a triple of ints (day, month, year) representing a date. Returns an int in range(1, 367) that corresponds to the ordinal position of date in year. For example, January 1st produces 1, and December 31 produces 365 or366, depending on whether it is a leap year or not. """ def elapsed_days(start_date, end_date): """ Calculate number of days between start_ and end_date. Both parameters are triples of ints (day, month, year). Returns an int, which is the elapsed time in days. """
in python
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