import sys import time start = time.clock() # default file name CPU = 2.26 # put your CPU frequency here in GHz fileName = fileName = r'D:\Teaching\Proposals\BSc-CS-IntroductionToTheoryOfComputability\2-Projects\Project1\2600-0-no-accents.txt' if len(sys.argv) > 1: fileName = argv[1] # getting the file name as the first argument with open(fileName) as novel: for lineNo, line in enumerate(novel, 1): # put your code here, lineNo is the line number starting at 1 and line contains the lineNo line of novel print lineNo, '\t', line # this is just for test end = time.clock() print "\nTotal Running Time is %f \nYour score of runtime is %f" % ((end - start) * 1000, (end - start) * 1000 * CPU)