Question: Problem 5. (Day of the Week) Write a program day_of_week.py that takes three integers m (for month), d (for day), and y (for year) as
Problem 5. (Day of the Week) Write a program day_of_week.py that takes three integers m (for month), d (for day), and y (for year) as command-line arguments and writes the day of the week (0 for Sunday, 1 for Monday, and so on) D, calculated as follows:
y0 = y(14m)/12
x0 = y0 + y0/4y0/100 + y0/400
m0 = m + 12((14m)/12)2
D = (d + x0 + 31m0/12) mod 7
$ python3 day_of_week.py 3 14 1879
5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
