Begginers Guide - Exrcise. Help me, plz!
Jeffrey-man
i-have at no.mail
Sat Mar 16 15:45:30 EST 2002
Hello, everybody!
I'm a newbie and I'm just learning. I know, it's a stupid question, but I
want to resolve it.
Learning the Begginers Guide, I found an exercise. It tells me:
"Write a program that continually reads in numbers from the user and adds
them together until the sum reaches 100."
Can anybody help me?
-----
sum_stop = 100
num = input("Please enter the number: ")
for sum in range(num+num,sum_stop):
print "Now the sum is", num+num
sleep(1)
print "The sum is >/= 100!"
-----
Maybe I'm doing something wrong?
Best regards.
More information about the Python-list
mailing list