Open main menu

CDOT Wiki β

Changes

OPS435 Python Assignment 2

625 bytes added, 15:59, 14 March 2019
Bonus item 10% extra
== Suggested Script Development and Testing ==
The following python functions (to be created) are useful in handling the following sub-tasks:
* gets login records from the output of "last" command and filters out unwanted records
* reads login records from files and filters out unwanted records
* generate convert login records into proper python object type so that it can be processed using as much built-in functions as possible * create function which generates daily usage reports by user and/or by remote host* generate create function which generates weekly usage reports by user and/or by remote host* generate create function which generates monthly usage reports by user and/or by remote hostTo help you with this assignment, [[OPS435 A1 Usage Report Template|here is a template]] you can use as a starting point in developing designing your own Python Usage Report script.
For each function, identify what type of objects should be passed to the function, and what type of objects should be returned to the caller. Once you have finished coding a function, you should start a Python3 interactive shell, import your functions and manually call the function you want to test under interactive modeand verify its correctness.
Once you have all the individual function tested and that each is working properly, perform the final test with test data provided by your professor and verify that your script produces the correct results before submitting your python program on Blackboard.
|}
== Bonus item 10% extra ==
* Create a function to capture that output of the 'last -Fiw' on the system your script is being executed and return the contents in the type of object as what you get from a regular login/logout record file.
* Call this function and use the objects it returned when the file name input at the command line is 'last'.
== Submission ==
After fully testing your program, submit your python script ur_[student_id].py and your algorithm and program design report ur_[student_id].pdf in pdf format on Blackboard by April 5th, 2019.
1,760
edits