Advertisement
Guest User

Untitled

a guest
Jul 11th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. def userPass():
  2. checkAccount = input("Do you have an account (Y or N)?")
  3. if (checkAccount == 'N' or checkAccount == 'n'):
  4. userName = input("Please Set Your New Username: ")
  5. password = input("Please Set Your New Password: ")
  6. // if (userName in dictAcc):
  7. print("Username is taken")
  8. userPass()
  9. else:
  10. // dictAcc[userName] = password
  11. print("Congratulations! You have succesfully created an account!")
  12. time.sleep(1.5)
  13. dataInput()
  14. elif(checkAccount == 'Y' or checkAccount == 'y'):
  15. login()
  16. else:
  17. print("Invalid answer, try again")
  18. userPass()
  19.  
  20.  
  21. def login():
  22. global userName
  23. global password
  24. global tries
  25. loginUserName = input("Type in your Username: ")
  26. loginPass = input("Type in your Password: ")
  27. if (tries < 3):
  28. // for key in dictAcc:
  29. // if (loginUserName == key and loginPass == dictAcc[key]):
  30. // print("You have successfully logged in!")
  31. dataInput()
  32. else:
  33. print("Please try again")
  34. tries += 1
  35. login()
  36. if (tries >= 3):
  37. print("You have attempted to login too many times. Try again later.")
  38. time.sleep(300)
  39. login()
  40.  
  41. userPass()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement