Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. users = {"Tester1" : "Test"}
  2.  
  3. #Authetication of Players
  4. valid = False
  5. while not valid:
  6. username = input("Please enter your username: ")
  7. if username in users.keys():
  8. valid = True
  9. else:
  10. print("Username incorrect!")
  11.  
  12. valid = False
  13. while not valid:
  14. password = input("Please enter your password: ")
  15. if password == users[username]:
  16. valid = True
  17. print("Access granted.")
  18. print("-----------------------------")
  19. else:
  20. print("Password incorrect!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement