V22.0002
Summer Session II
Python Assignment 2
Due: Wednesday, July 7th
PART ONE:
Your program will be able to tell an NYU student whether s/he will have the
day off for any given day during the academic year 2010-2011. (This is per
the official NYU Calendar: http://www.cs.nyu.edu/webapps/2010-11/Undergraduate/calendar)
These are the following NYU Holidays that you should account for during the
Academic year 2010-2011:
- 9/6 (2010) Labor Day
- 11/25- Thurs. - Sat. November 27 -- Thanksgiving
- Winter recess December 24 (2010) - Jan. 22 (2011)
- Presidents' Day: February 21
- Spring recess Mon. - Sat. March 14 - 19
- Memorial Day: May 30
- Independence Day: Monday, July 4
- August 13 - September 5 (2011): summer recess
Here is how it should work: First, you should prompt the user to enter an
integer for the month and an integer for the day in question. (For example,
entering "2" for
the month and "21" for the day would
represent February 21st.). (Note that we start
the year on Sept.6 - that should be assumed to be 2010. Note that we END the
year on Sept. 5 - that should be assumed to be 2011).
Hints:
- The program should check to be sure that the month and day that
the student enters are valid and tell the user if they are not. For
example, "April 31" is not a valid entry.
- The program should make sure that the user provides a date within the correct range (01/01/10 - 08/31/10) and tell the user if they picked a date outside of the dates under consideration.
- Some NYU vacations stretch out over multiple days.
- Your program should make sure that the numbers that you work with are integers.
Notes about your program:
- Make sure your program includes a comment at the beginning with your name along with a brief synopsis of the program.
- You should use comments throughout the source code to explain key steps and calculations.
- Choose intuitive names for variables
- You should use blank lines where appropriate to make your program easy to read.
- Make sure that your program does not contain any syntax errors.
- Test your program to be sure that it runs the way that you expect.
PART TWO:
-
When you are done and have tested it, email your source file "smithjoe_assign2.py"
to the course grader account at v002su2@cs.nyu.edu
. In the subject field of your email, please write your firstname_lastname_assignment#.