Project 1 - Days in Month/Year

Due - Friday, February 9, 2007

The goal of this project is to give you experience using conditionals and functions in Python. You will write a program that prompts the user for a date specified by the month (represented by a string), day, and year, and will print for the user (1) the number of days from the date entered until the end of the specified month and (2) the number of days from the date specified until the end of the year. A sample run of your program would look as follows:

Enter a string representation of the month: November
Enter a day: 30
Enter a year: 2007
There are 0 days remaining in the month.
There are 31 days remaining in the year.

Implementation Requirements and Hints

  1. For full credit, your program must implement, and correctly use, the following functions:
  2. Your program must print an error message and exit if any information entered is invalid.
  3. Consider using additional functions that prompt the user for input.

Due 1:30PM - Friday, February 9, 2007

  1. Complete and submit your working code. Turn in a hard copy in class and place a copy of your .py file in the submit directory /home/submit/cs110-s07/username.
  2. Make sure that each function is well documented. Your documentation should specify the type and function of the input parameters and output.
  3. Run your program on a variety of inputs ensuring that all error conditions are handled correctly.
Note: No portion of your code may be copied from any other source including another text book, a web page, or another student (current or former). You must provide citations for any sources you have used in designing and implementing your program.
Sami Rollins