Guest User

Untitled

a guest
Nov 15th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. import random, time
  2.  
  3. username=["Ahmad", "Adam"] #This is a list of the usernames which have been authorised
  4. password=["AAA1", "BBB2"] #This is a list of passwords which go with the usernames
  5.  
  6. print("This is for player 1!") #This is the login system for player 1
  7. user1 = input("What is your username?")
  8. if user1 in username :
  9. print("Your Username Was Found")
  10. password2 = input("What is your password?")
  11. if password2 in password:
  12. print("You are now in the game!")
  13. **else:**
  14. print("Sorry password not recognised!")
  15. else:
  16. print("Sorry username not found!") #Allows the user to make an account if one is not allready created
  17. time.sleep(0.5)
  18. print("Lets create an account!")
  19. time.sleep(0.5) #This basically means how much time the whole program is paused as a mean of mimicing an execution
  20. chosenuser=input("Enter a desired Username!")
  21. time.sleep(0.5)
  22. chosenpass=input("Enter a chosen Password!")
  23. username.append(chosenuser)
  24. password.append(chosenpass)
  25. user1=chosenuser
  26. print("You are now registered!")
Add Comment
Please, Sign In to add comment