Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def userPass():
- checkAccount = input("Do you have an account (Y or N)?")
- if (checkAccount == 'N' or checkAccount == 'n'):
- userName = input("Please Set Your New Username: ")
- password = input("Please Set Your New Password: ")
- // if (userName in dictAcc):
- print("Username is taken")
- userPass()
- else:
- // dictAcc[userName] = password
- print("Congratulations! You have succesfully created an account!")
- time.sleep(1.5)
- dataInput()
- elif(checkAccount == 'Y' or checkAccount == 'y'):
- login()
- else:
- print("Invalid answer, try again")
- userPass()
- def login():
- global userName
- global password
- global tries
- loginUserName = input("Type in your Username: ")
- loginPass = input("Type in your Password: ")
- if (tries < 3):
- // for key in dictAcc:
- // if (loginUserName == key and loginPass == dictAcc[key]):
- // print("You have successfully logged in!")
- dataInput()
- else:
- print("Please try again")
- tries += 1
- login()
- if (tries >= 3):
- print("You have attempted to login too many times. Try again later.")
- time.sleep(300)
- login()
- userPass()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement