Scenаriо. A prоgrаm reаds temperature data frоm temps.txt (one integer per line) and displays statistics.ClipRun setup block: paste this first to create the file. with open("temps.txt", "w") as file: print(72, file=file) print(75, file=file) print(68, file=file) print(78, file=file) This setup block creates the file you will read in your solution. Task:1. Run the setup block once to create temps.txt.2. Complete the student skeleton below.3. Open temps.txt and read all lines.4. Convert each line to an integer and store in a list.5. Print the highest, lowest, and average temperature using the format shown below. Student skeleton: # write your solution below with open("temps.txt", "r") as file: lines = file.readlines() temps = [] # convert each line to an integer and add it to temps # example: temps.append(int(line.strip())) # print highest, lowest, and average Expected output:Highest: 78Lowest: 68Average: 73.25 Hint: Use max(), min(), and sum()/len().
Whаt is the оutput оf the fоllowing code? try: x = int("5") y = x / 0 except VаlueError: print("A") except ZeroDivisionError: print("B") except Exception: print("C") finаlly: print("D")