Apr-23-2018, 08:00 PM
So, I've been trying to write this code that would tell me to stop once I entered the wrong password three times in a row and I don't know how to do it. Disclaimer, I'm very new to Python 3. I wrote the python code below for password input but it doesn't prompt me to stop after three attempts. What should I add to this code? or what should I delete so I can achieve what I wanted it to do. Just need some boost and help so I can clear my mind. (^^o) Can't seem to sleep at night when you don't get what you want to happen with your code. A bit of help is appreciated! Thanks!
Josh
password = str(input("Please enter password to continue: ")) if password == "fusion": print("Welcome! the password is correct, you may enter.") exit() while password != "fusion": print("what is the Password?") password = input() while password == "fusion": print("Welcome! the password is correct, you may enter.") exit()Thank you,
Josh