DESCRIPTION Students: Please keep in mind the OMSI rules. Save your files often, make sure OMSI fills your entire screen at all times, etc. Remember that clicking CopyQtoA will copy the entire question box to the answer box. In questions involving code which will PARTIALLY be given to you in the question specs, you may need add new lines. There may not be information given as to where the lines should be inserted. MAKE SURE TO RUN THE CODE IN PROBLEMS THAT INVOLVE CODE! QUESTION (30 pts) Which of the following pieces of information does the OS store about a file on disk. Answer as many as apply, e.g. "(ii) and (iv)": (i) number of bytes; (ii) date of last modificaiton; (iii) number of lines; (iv) start location on disk. QUESTION -ext .py -run 'python omsi_answer2.py (35 pts) Here you will write a function findFile(fname) that returns True or False, according to whether the file fname exists somewhere in the directory tree whose root is the site of the call. Directories DO count as files. Make sure not to do unnecessary searching after the file is found. def checkForFile(userArg,dr,flst): def findFile(fname): userArg = [fname,False] os.path.walk('.',checkForFile,userArg) import os print findFile('w') print findFile('w1') print findFile('ww') QUESTION -ext .py -run 'python omsi_answer3.py (35 pt) You will write two functions here: makeLineIdx(fname) will read the file given by fname, and return the character positions at which the various lines start; midReadLines(fname,fnameIdx,startLine) will read the file fname, starting at line number startLine, and return those lines. Both character position and startLine numbering begin at 0. def makeLineIdx(fname): f = open(fname) lns = f.readlines() idxs = [0] return idxs def midReadLines(fname,fnameIdx,startLine): f = open(fname) # reads the file 'abc\nde\nf' idx = makeLineIdx('x') print idx # 0,4,7 print midReadLines('x',idx,1) # ['de','f']