Changes

Jump to: navigation, search

OPS435 Python Assignment 1 2018 Fall

654 bytes added, 11:38, 2 October 2018
Computation Requirements
= Computation Requirements =
== Algorithm Design ==
* Write a step-by-step instructions in English on how to figure out a date which is n days before or after a given date.
* While you working on the step-by-step instructions, note that there are different number of days in each month and some years hav 365 days and some years have 366 days.
* You should also do some research to find out when we started using the Calendar in the current form. (This will pose a limit on the validity of your algorithm.)
== Required Functions ==
You must Based on your algorithm, you should at least have the the following three functions defined in your python script(see later section on the purpose of each function):
* dbda()
* tomorrow()
== Documentation ==
* Please use python's docstring to document your python script and each of the functions you created for this assignment. The docstring should describle 'what' the function does, not 'how' it does.
* The following shows the docstring that was added to the tomorrow() function which provides the following information when call with help(tomorrow) in the python interactive shell:
<pre>
== Authorship Declaration ==
All your Python code for this assignment must be placed in a <font color='red'><b><u>single source python file</u></b></font>. Please include the following declaration <b><u>as the docstring</u></b> in your Python source code file (replace "Student Name" with your own name):
<source>OPS435 Assignment 1 - Fall 2018
Program: [student_id].py (replace student_id with your Seneca User name)
== Script structure and sample template ==
Your program code should all be in a single python file with at least the functions mentioned above: dbda(), tomorrow(), and yesterday(). You can also add additional functions likebased on your algorithm, e.g.: leapyear(), validdate(), usage(), etc
* The dbda() 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.
return next_date
</pre>
 
= Due Date =
This Assignment is due on Sunday October 14, 2018 before mid-night. Please submit your python script together with test result on blackboard under the assignments section.
1,760
edits

Navigation menu