Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for number in range(1, 4):
- user_password = raw_input("enter your password: ")
- # if correct password then leave loop
- if user_password == "j":
- break
- print "wrong password nmr", number, ":", user_password
- else:
- # this part is executed only if `break` was not used in `for` loop
- print "Sorry, you enter 3 wrong passwords. Goodbye"
- exit()
- print "You are logged in"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement