Design a program in python with a loop that asks the user enter a series of positive numbers and display their sum.
1
Expert's answer
2011-06-06T07:45:03-0400
#!/usr/bin/python
n = input("Please enter the number of letters: ") s = 0 for i in range(1,n+1): print 'a[',i,']=' a=input() s=s+a print 'The total sum of all these numbers is ',s #####################################################
Comments
Leave a comment