import sys from Time import * # This function takes as input a string s of the form "09.45AM" # and returns a Time object for the time denoted by s def generate_time(s): pass # This function takes as input fname and returns a list of non-comment # lines from the file def read_data(fname): pass # This function takes a list of non-comment lines from input and # returns a list of triples (from,to,nsteps) corresponding to the # non-comment lines def extract_data_parts(data): pass # This function takes a list of triples (from,to,nsteps) and # removes and prints "bad" data - in which from-time is after to-time def remove_bad_data(data): pass # This function takes a list of triples (from,to,nsteps) and # returns total number of steps and total number of walking minutes # in the data def compute_stats(data): pass def main(): total_steps,total_minutes = compute_stats(remove_bad_data(extract_data_parts(read_data(sys.argv[1])))) print("\nTotal steps: ",total_steps) print("Hourly steps rate: ",int(total_steps/(total_minutes/60)),"\n") main()