Newbe: password program
pavs
vze33v6m at verizon.net
Sat Jan 18 08:27:38 EST 2003
#Modify a password guessing program to keep track of how
#many times the user has entered the pasword wrong.
#If, it is more than 3 time, print "That must have been complicated."
# ------------------------------------------------------------------
#Waits untill password has been entered. Use Control -C to break out without
# the password
#Note that this must not be the password so that the while loop runs atleast once
password = "pavs"
count = 0
while password != "unicorn":
print "Wrong Password"
password = raw_input("Password:")
count = count + 1
print "Welcome in"
if count > 3:
print "That must have been hard"
--------------------------------------------------------------------------------
:)
I think the program works.
If so, than this would be my first workable program without outside help :)
Python is so much FUN!
Cheers,
pavs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20030118/891785a9/attachment.html>
More information about the Python-list
mailing list