Open main menu

CDOT Wiki β


OPS435 Assignment 2 for Section C

194 bytes added, 17:35, 3 December 2020
Suggested Process
'''Due Date:''' Please follow the three stages of submission schedule:
* Complete the algorithm document for this assignment script by November 27, 2020 and submit on Blackboard by 11:59 PM,
* Complete the your Python script and push to Github by August 14December 11, 2020 at 911:00 59 PM, and* Copy your Python script into a Word document and submit to Blackboard by August 14December 11, 2020 at 911:00 59 PM.
All your Python codes for this assignment must be placed in a <font color='red'><b><u>single source file</u></b></font>. Please include the following declaration by <b><u>you</u></b> as the <font color='blue'><b>script level docstring</b></font> in your Python source code file (replace [Student_id] with your Seneca email user name, and "Student Name" with your own name):
<source>OPS435 Assignment 2 - Summer Fall 2020Program: a2_[seneca_id]
Author: "Student Name"
The python code in this file a2_[seneca_id] is original work written by
"Student Name". No code in this file is copied from any other source
including any person, textbook, or on-line resource except those provided
<li> Use the invite link posted to Blackboard to accept the assignment, and clone the repo to a Linux machine.
<li> Copy into a2_<myseneca_id>.py. Replace with your Myseneca username.
<li> Run the script itself. Investigate argparse. <b>In the main block, print(args).</b> Experiment with the various options, particularly -v. <li> Read the usage output in the docs, what option must you implement? Go ahead and implement it. Test with print() for now. <b>Commit the change.</b><li> Investigate the `parse_user<code>parse_for_user()` </code> function, with the <code>usage_data_file</code>. This <b>In main, call `parse_for_user()` with `output` as the argument. Investigate what's returned.</b><li> <code>parse_for_user()</code> should take the list of lines from the file, and instead return a list of usernames. <b>In main, print the title header and the output. Commit the change.</b><li> Use argparse with <b>Once you have `output`-l user-> ` parse_for_user()`usage__data_file` --> correct output being printed, use if conditions to call the print only when `parse_user()-l user` function. <b>Commit is in the changecommand line arguments.</b><li> Write a function to print the list from `parse_for_user()`. Now you have input -> processing -> output. <b>Continue committing these changes as your proceed.</b><li> Implement the same things as parse_for_user but for `<code>parse_for_hosts`</code>. Output should be sortedUse the user function to guide you.
<li> Compare your output with the output below.
<li> Write the `parse_for_daily()` function using the pseudocode given. This should be taking the list of lines from your file, and output a dictionary with start dates in DD/MM/YYYY format as the key and usage in seconds as the value.
== Submission ==
* Stage 1: Submit your algorithm document file to Blackboard by November 27, 2020.
* Stage 2: Use commits to push your python script for this assignment to The final state of your repository will be looked at on August 14December 11, 2020 at 911:00 59 PM.* Stage 3: Copy your python script into a Word document and submit to Blackboard by August 14December 11, 2020 at 911:00 59 PM.