Question: Write a python idle program that allows the user to select a data input file, and asks the user for a high and low temperature.
Write a python idle program that allows the user to select a data input file, and asks the user for a high and low temperature. Then output to the screen the number of days that the temperature was below the low temp, and the number of days above the high temperature. Also, print the percentage of days the temperatures were above or below the given high and low values. Test your program on the provided data files. THIS IS HOW FAR I GOT. I CANT SEEM TO GET IT TO WORK.
THE DATA INPUT FILE LOOKS LIKE THIS 
import os import tkinter as tk from tkinter.filedialog import # find the script location script-dir = os . path. dirname (os . path .abspath(_file-)) # input file fnn = askopenfilename (title= "Select f in open (fn in, "r") input file", filetypes=t("*.TXT ", "*.txt ")], 1nitialdir=script d # Calculation numbersread integers ('data.txt') low -int (input ('Enter low temperature: ')) high - int (input ('Enter high temperature:) highTempCount0 lowTempCount0 for i in numbers: if i> high: highTempCount + 1 if i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
