Answer to Question #101866 in Python for ashley

Question #101866
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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS