Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This is what I know so far
- import time
- import sys
- while True:
- yesorno = input("Are you 18 or older? type y or n to continue:")
- if yesorno == "y":
- print("\nPlease create a username to continue.")
- myUser = input("Create a username: ")
- myPass = input("Create a password: ")
- time.sleep(1)
- print("\nSaving data")
- time.sleep(1)
- print("...\n")
- time.sleep(1)
- while True:
- for userCounter in range(1,6):
- for passCounter in range(1,6):
- print("Please enter the credentials you provided to continue. ")
- myNewUser = input("Username: ")
- time.sleep(1)
- if myNewUser == myUser:
- myNewPass = input("Password: ")
- time.sleep(1)
- if myNewPass == myPass:
- print("Welcome, %s"%(myUser))
- sys.exit()
- elif myNewPass != myPass:
- print("Incorrect Password.")
- print("Number of Login Attempts: %s"% (passCounter))
- passCounter += 1
- if passCounter == 6:
- print("You've exceeded your login Attempts for today.")
- print("Please try again in 24 hours.")
- sys.exit()
- elif myNewUser != myUser:
- time.sleep(1)
- print("Error, Incorrect Username")
- print("Number of Login Attempts: %s\n"% (userCounter))
- userCounter += 1
- time.sleep(1)
- if userCounter == 6:
- print("You've exceeded your login Attempts for today.")
- print("Please try again in 24 hours.")
- sys.exit()
- else:
- print("You did not type anything.\n")
- elif yesorno == "n":
- print("Goodbye.")
- break
- else:
- print("You did not type y or n, please try again.\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement