Question: Problem 3 . ( Day of the Week ) Write a program called day _ of _ veek.py that accepts m ( int ) ,

Problem 3.(Day of the Week) Write a program called day_of_veek.py that accepts m(int),d(int), and y(int) as command-line
arguments, computes the day of the week (0 for Sunday, 1 for Monday, and so on) dow using the formulae below, and writes
the day as a string ("Sunday", "Monday", and so on) to standard output.
y0=y-14-m12
x0=y0+y04-y0100+y0400
m0=m+12(14-m12)-2
dow=(d+x0+31m012)mod7
3--/workspace/controlfiow_programs
$ python3 day_of_week.py 3141879
Friday
$ python3 day_of_week.py 4121882
Wednesday
Problem 3 . ( Day of the Week ) Write a program

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 Programming Questions!