Day of the Week

You will store the date in the format DD/MM/YYYY in a text file called day.in. Your program will print out the day of the week for that date. Here is a sample output for the program:
12/12/1960

The day is Monday.

Assume that the input is correct and in the right format. You do not have to check for errors.

This algorithm was developed by Rev. Zeller. Let us define the quantities a, b, c, and d as follows:

Important: In our calendar, the year begins in January and ends in December. In the calendar, used in the algorithm, the year begins in March and ends in February. Your program should internally make the adjustment and not expect the user to know this. For example, if in our calendar we have January 2009 (month = 1 and year = 2009), the program will make the adjustment so that month = 11 and year = 2008. If you do not make the adjustment you will not get the right result.

For example, 31 July 1929, gives a = 5, b = 31, c = 29, and d = 19. Similarly, 3 January 1988, gives a = 11, b = 3, c = 87, and d = 19.

Now compute the following quantities:

r gives the day of the week. r = 0 represents Sunday, r = 1 represents Monday, and so on. The output from your file should match the following statement:

The day is Monday.
Where Monday may be replaced by any day of the week.

The program that you will be writing will be called Day.py. You may use the same variable names used in the problem statement or come up with your own. Your file Day.py have the following header:


#  File: Day.py

#  Description:

#  Student Name:

#  Student UT EID:

#  Course Name: CS 309

#  Unique Number: 50595

#  Date Created:

#  Date Last Modified: