[Tutor] (no subject)
bob gailer
bgailer at gmail.com
Sat Sep 5 04:50:22 CEST 2009
kb1pkl at aim.com wrote:
> 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?
You are missing a looping statement. In Python they are for or while,
not if.
Also realize the above, when converted to a while loop will never
terminate, since i keeps growing.
--
Bob Gailer
Chapel Hill NC
919-636-4239
More information about the Tutor
mailing list