Day of the Week (Due 26 September 2008)

In this program you will prompt the user to enter the day, month, and year. Your program will print out the day of the week for that date. Here is a sample output for the program:
Enter day: 12
Enter month: 12
Enter year: 1960

That day was Monday.

Your program will check the following:

All the above limits are inclusive. If any one of the conditions fails then the program will print an error message of the form Out of Range and quit. To quit a program safely use the statement:

return

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

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 program that you will be writing will be called Day.py. We will be looking at good documentation, design, and adherence to the coding convention discussed in class. You may use the same variable names used in the problem statement or come up with your own. If the day is in the future the tense of the verb should be changed accordingly. Your file Day.py have the following header:


#  File: Day.py

#  Description:

#  Student Name:

#  Student UT EID:

#  Course Name: CS 303E

#  Unique Number: 

#  Date Created:

#  Date Last Modified:

Use the turnin program to submit your Day.py file. The TAs should receive your work by 11 PM on Friday, 26 September 2008. There will be substantial penalties if you do not adhere to the guidelines. The TA in charge of this assignment is Nam Nguyen (namphuon@cs.utexas.edu).