Please always put a meaningful subject line in when you post.
<kb1...@aim.com> wrote in message
I know, I'm a total noob (started yester day)
But when I enter this code:
x = 1
if x>0:
??? a = raw_input ("Type something in...I will echo it:")
??? print a
??? x=x+1
it does not loop..am I missing something here?
Yes, a loop.
Python has two loop constructs: for and while.
If you replace the if test with a while test it will do
what you want I think.
while x>0:
Except that it will never stop looping!
You might want to consider putting a mechanism for
stopping in there :-)
But any reasonable tutorial for beginners should cover
loops.
Try mine for example... :-)
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor