Changes

Jump to: navigation, search

OPS435 A1 Usage Report Template

3 bytes added, 14:34, 11 November 2018
A1 Usage Report Template
import sys
import time
 
def menu(title,items,choice):
''' docstring for this function '''
selection = ''
while selection not in choice:
print(title)
print('=' * len(title))
for item in items:
print(item)
selection = input('menu choice -->')
return selection
def get_login_rec():
filter out the unwanted records
add filtered record to list (login_recs)'''
[ put your python code for this function here ]
return login_recs
filter out the unwanted records
add filtered record to list (login_recs)'''
[ put your python code for this function here ]
return login_rec
def cal_daily_usage(subject,login_recs):
''' docstring for this function
check number of subjects in login_recs if less than 10, display subject selection menu for each subject, process generate daily usagereport for the given dispaly daily usagesubject (user or remote host)''' [ put your python code for this function here ] return 0daily_usage
def cal_weekly_usage(subject,login_recs):
'''check number of subjects in login_recs if less than 10, display subject selection menudocstring for this function for each subject, process generate weekly usagereport for the given display weekly usagesubject (user or remote host)''' [ put your python code for this function here ] return 0weekly_usage
def cal_monthly_usage(subject,login_recs):
'''check numbe of subjects in login_recs if less than 10, display subject selection menudocstring for this function for each subject, process generate monthly usagereport fro the given display monthly usagesubject (user or remote host)''' [ put your python code for this function here ] return 0monthly_usage
if __name__ == '__main__':
import argparse
... [ code to retrieve command line argument using the argparse module [ ... [ based on the command line option, generate and print the requested usage report ] ...
</pre>
1,760
edits

Navigation menu