chris65
07-14-2002, 03:57 AM
password = "foobar"
while password != "unicorn":
password = raw_input ("password:")
print "welcome in"
this is simple i know, but this is what i am trying to do. Just learning python.
different from above:
password = "foobar"
guess = 3
while password != "unicorn":
password = raw_input ("password:")
#gets input for password, now if input is given more that 3
#times then warning
if guess > 3:
print "To Hard?"
else:
print "welcome in"
"or" if raw_input > 3
there are a few way's that jump out but none of them are right. The manual has an example but i tried it in this one and its no good. Help??
while password != "unicorn":
password = raw_input ("password:")
print "welcome in"
this is simple i know, but this is what i am trying to do. Just learning python.
different from above:
password = "foobar"
guess = 3
while password != "unicorn":
password = raw_input ("password:")
#gets input for password, now if input is given more that 3
#times then warning
if guess > 3:
print "To Hard?"
else:
print "welcome in"
"or" if raw_input > 3
there are a few way's that jump out but none of them are right. The manual has an example but i tried it in this one and its no good. Help??