# Answer the following questions based on this Python code:…
# Answer the following questions based on this Python code: def main(): done = False while not done: try: filename = input(“Please enter the file name: “) data = readFile(filename) total = 0 highest = 0 lowest = 1000000 for name, score in data: total += score if score > highest: highest = score if score < lowest: lowest = score average = total / len(data) print("Average score:", average) print("Highest score:", highest) print("Lowest score:", lowest) done = True except IOError: print("Error: file not found.") except ValueError: print("Error: file contents invalid.") except RuntimeError as error: print("Error:", str(error)) ########################def readFile(filename): infile = open(filename, "r") try: return readData(infile) finally: infile.close() ######################def readData(infile): line = infile.readline() numberOfEntries = int(line) data = score = float(parts) data.append((name, score)) line = infile.readline() if line != "": raise RuntimeError("End of file expected.") return data ###################### Start the program.main()