Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random, time
- username=["Ahmad", "Adam"] #This is a list of the usernames which have been authorised
- password=["AAA1", "BBB2"] #This is a list of passwords which go with the usernames
- print("This is for player 1!") #This is the login system for player 1
- user1 = input("What is your username?")
- if user1 in username :
- print("Your Username Was Found")
- password2 = input("What is your password?")
- if password2 in password:
- print("You are now in the game!")
- **else:**
- print("Sorry password not recognised!")
- else:
- print("Sorry username not found!") #Allows the user to make an account if one is not allready created
- time.sleep(0.5)
- print("Lets create an account!")
- time.sleep(0.5) #This basically means how much time the whole program is paused as a mean of mimicing an execution
- chosenuser=input("Enter a desired Username!")
- time.sleep(0.5)
- chosenpass=input("Enter a chosen Password!")
- username.append(chosenuser)
- password.append(chosenpass)
- user1=chosenuser
- print("You are now registered!")
Add Comment
Please, Sign In to add comment