Advertisement
Guest User

Untitled

a guest
Nov 29th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. username = 'g'
  2. password = 'p'
  3. user = False
  4. passw = False
  5. access = False
  6.  
  7. while access == False:
  8. nameinp = (input("please enter username: "))
  9. passinp = (input("please enter password: "))
  10. if nameinp == username:
  11. user = True
  12. if passinp == password:
  13. passw = True
  14. if user == True and passw == True:
  15. access = True
  16.  
  17. ##PROBLEM SECTION::
  18. #WONT PRINT THE TRY AGAIN BIT
  19.  
  20. else:
  21. access = False
  22. while access == False:
  23. print("incorrect credentials, try again")
  24.  
  25.  
  26.  
  27.  
  28. print(access)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement