Write a program that asks the user to enter ten temperatures and then finds the sum. The input temperatures should allow for decimal values.
1
Expert's answer
2020-01-29T05:19:36-0500
print('Enter ten temperatures please')
sum = 0 #initialize variable for sum
for i in range(10):
T = float(input()) #read user input
sum = sum + T #add current temperature value to sum
print('Sum is: ',sum) #print result
Comments
Leave a comment