Super-newbie needs help!
snowcrash3 at hotmail.com
Wed Nov 28 18:50:00 CET 2001
Let me just preclude this posting by saying i am a Web Designer who's
decided that she wants to learn programming, and this is my first stab
at it. i don't pretend to understand what i am doing. Thats what you
guys are here for.
Anyhow, i am reading through this nice tutorial provided at
hetland.org, called "instant hacking". Just the basics on Python. i am
presented with my very first exercise, and am stuck--
"Write a program that continually reads in numbers from the user and
adds them together until the sum reaches 100. "
Now, i have some code:
total = 100
sum = input ("Enter your number.")
while sum < total:
print "You haven't reached 100 yet!"
sum = input ("give me another number") + sum
print "Ok, you got me!"
HUH? i don't think its right, i've changed it about 4 times before
posting it, and i've downloaded the Python 2.2 but can't seem to
figure out how to use the thing to check my code. i know its WILDLY
simple and feel like "well, gee, if i can't understand this much, then
i should quit before i feel REALLY stupid", but i am just going to
keep on truckin'....Hopefully with some help from comp.lang.python.
Thanks in advance,
More information about the Python-list