Changes

Jump to: navigation, search

OPS435 Python Assignment 1 2018 Fall

59 bytes added, 15:22, 25 September 2018
Program Name and valid command line arguments
= Instruction =
== Program Name and valid command line arguments ==
Name your python3 program as <code>[Student_id].py</code>. The following example assumes that the student_id is rchan. The program should accept two command line parameters, the first one is the date in "YYYYMMDD" format, and the second one is the number of day from the given date, a positive value indicates the number of days after the given date, and a negative value indicates the number of days before the given date. There is an option called --step that makes the program print out all dates until the final date. If the "YYYYMMDD" format is broken give an appropriate error message. Invalid months (>12) or invalid days of month(different for each month), should be detected and give appropriate error messages. For examples:
* <b><code>python3 rchan.py 20180101 1</code></b>, and the output should be<br />
20180102
1,760
edits

Navigation menu