Open main menu

CDOT Wiki β

Changes

OPS435 Python Assignment 1 2018 Fall

508 bytes added, 16:28, 25 September 2018
Program structure
== Program structure ==
Your program code should all be in a single python file with at least two the functionsmentioned above: leapyear(), one called yesterdaymain() and the other called , tomorrow(), validdate(), yesterday():
* The leapyear() function will take a year in "YYYY" format, and return True if the given year is a leap year, otherwise return False.
* The main() function will take a date in "YYYYMMDD" format, a positive or negative integer, and return a date either before or after the given date according to the value of the given integer in the same format.
* The validdate() function will take a date in "YYYYMMDD" format, and return True if the given date is a valid date, otherwise return False.
* The yesterday() function will take a date in "YYYYMMDD" format and return the date of the previous day in the same format.
1,760
edits