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://yp.lycos.com

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to