Advertisement
Guest User

Python basic username login

a guest
Oct 15th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. userName = "fred"
  2. passWord = "fred1"
  3.  
  4. uNameInput = "s"
  5. pWordInput = "s"
  6. count = 1
  7.  
  8. uNameInput = input("Enter the username: ").lower()
  9. pWordInput = input("Enter the password: ")
  10.  
  11. while userName != uNameInput or passWord != pWordInput:
  12. uNameInput = input("Enter the username: ").lower()
  13. pWordInput = input("Enter the password: ")
  14. count +=1
  15.  
  16. print("Success after", count,"attempts.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement