Answer:
def average_temp(s): f = open("s.txt","r") for line in f: myList = line.split(",") print(myList[0],end=",") t=0 for i in range(1,25,1): t += int(myList[i]) t /= 24 print(t) f.close()
def average_temp(s):
f = open("s.txt","r")
for line in f:
myList = line.split(",")
print(myList[0],end=",")
t=0
for i in range(1,25,1):
t += int(myList[i])
t /= 24
print(t)
f.close()
Explanation:
I used Python for the solution.