[Tutor] Help me please
yogeshwarran Nadeson
yogesh193 at lycos.com
Wed Mar 15 05:43:39 CET 2006
Hello,
I am a newbie in python programming without previous programming
experience.Here i would like to ask
a question based on the exercises given by Josh Cogliatti in his
tutorial.I'll paste the question.Hope you can help me to solve it.I'd
like to end it by saying thanks for all yourr help.
:Modify the password guessing program to keep track of how many times the
user has entered the password wrong. If it is more than 3 times, print
``That must have been complicated.''
This is the previous password program:
Password.py
# Waits until a password has been entered. Use control-C to break out with out
# the password
#Note that this must not be the password so that the
# while loop runs at least once.
password = "foobar"
#note that != means not equal
while password != "unicorn":
password = raw_input("Password:")
print "Welcome in"
Password.py
# Waits until a password has been entered. Use control-C to break out with out
# the password
#Note that this must not be the password so that the
# while loop runs at least once.
password = "foobar"
#note that != means not equal
while password != "unicorn":
password = raw_input("Password:")
print "Welcome in"
--
_______________________________________________
Search for businesses by name, location, or phone number. -Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060314/1ffb3977/attachment.htm
More information about the Tutor
mailing list