Write a Python turtle program that computes the sum of 5 numbers entered by the user. Use "For" loop
1
Expert's answer
2019-09-24T06:19:25-0400
s = 0 #var to sum
n = 5 # count of numbers
for i in range(n): # loop start
s+=int(input()) # add new integer numbers to var s
print ("Sum is: ", s) #printing final sum
Comments
Leave a comment