Grace L.

asked • 09/21/22

Can someone help me with this Please

(Day of the Week) Write a program called day_of_week.py that accepts m (int), d (int), and y (int) as command line arguments, representing a date, and writes the day of the week (0 for Sunday, 1 for Monday, and so on) dow to standard output, computed as

y0 = y − (14 − m) / 12
x = y0 + y0/4 − y0/100 + y0/400
m0 = m + 12 × ((14 − m) / 12) − 2
d0 = (d + x + 31m0 / 12) mod 7


1 Expert Answer

By:

Calvin D. answered • 09/26/22

Tutor
5 (233)

Computer Scientist & US Air Force Cyber Security Officer

Grace L.

Thanks!
Report

10/04/22

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.