Open main menu

CDOT Wiki β

Changes

OPS435 Python3 Assignment 1

4 bytes added, 10:56, 20 September 2019
Overview
When making back up of data files or log files, it is a very common practice to name the backup directories and/or files based on the date the backup was done. In order to restore or locate the directory/file, we often need to find out the backup date from today's date.
The computational task for this assignment is to design an algorithm and write a python script according to your algorithm with appropriate functions. The script should take a date in the "YYYYMMDDYYYY/MM/DD" format and the number of days before or after the given date as the command line arguments, calculate and output to the standard output data channel the targeted date which is the number of day before or after the given date in the same format.
== Coding Standard ==
== Command Line Argument to be supported ==
* Name your python script as a1_[student_id].py, where [student_id] is your Seneca email user name.
* Your python script must support two mandatory command line arguments : (1) any valid date in YYYYMMDD YYYY/MM/DD format, (2) number of days before or after the given date, and one option flag: "--step"
* If there are less or more than two data items provided at the command line, your script should display the correct usage message and exit.
1,760
edits