[Tutor] while and for
CMNOLEN@aol.com
CMNOLEN@aol.com
Mon, 9 Oct 2000 13:31:43 EDT
I asked earlier for guidance in writing a program to total input from 100
entries. It worked great. Now I want the program to contain an 'Enter 0 to
quit' line. Also I would like a running count of the entries to show in the
'The sum is now' line. I am stuck. I guess these questions are so basic most
print doesn't answer them?I am stuck!
I am using:
#########################################################
total = 0
for i in range(100):
total = total + input("Please enter your next number: ")
print "The sum is now", total
#########################################################