Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user = input("Set a username: ")
- password = input("Set a password: ")
- while True:
- userIn = input("Enter username: ")
- if userIn == user:
- print("Correct")
- while userIn == user:
- passIn = input("Enter password: ")
- if passIn == password:
- print("Logged in as", user)
- break
- else:
- print("Incorrect, try again")
- else:
- print("Incorrect, try again")
- continue
- break #why is this break statement executed after the inner while break statement is executed?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement