Write a python program that reads a list of temperatures from a file called temps.txt,
converts those temperatures to Fahrenheit,
and writes the results to a file called ftemps.txt
Answers
Answer:
I don't use Python, but I use Thonny. So, I hope this is what you need:
If you don't want to download the file, I'll just paste the plain script here.
print("Month Temp City")
print("Jan. 29.3 St Louis")
print("Feb. 33.9 St Louis")
print("Mar. 45.1 St Louis")
print("Apr. 56.7 St Louis")
print("May 66.1 St Louis")
print("June 75.4 St Louis")
print("July 79.8 St Louis")
print("Aug. 77.6 St Louis")
print("Sept. 70.2 St Louis")
print("Oct. 58.4 St Louis")
print("Nov. 46.2 St Louis")
print("Dec. 33.9 St Louis")
print("Jan. 51.1 San Francisco")
print("Feb. 54.4 San Francisco")
print("Mar. 54.9 San Francisco")
print("Apr. 56 San Francisco")
print("May 56.6 San Francisco")
print("June 58.4 San Francisco")
print("July 59.1 San Francisco")
print("Aug. 60.1 San Francisco")
print("Sept. 62.3 San Francisco")
print("Oct. 62 San Francisco")
print("Nov. 57.2 San Francisco")
print("Dec. 51.7 San Francisco")
Hope this helps!