Advertisement
timber101

Dice Game 1 - Password

Nov 16th, 2022 (edited)
954
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. # password system, simple multi user and a common password
  2. # extended to two users..
  3.  
  4. user_list= ["Bob","Fred","Pragya","Colin"]
  5. password = "Its raining"
  6.  
  7. user1 = input("Who are you user1? >>")
  8. user2 = input("Who are you user2? >>")
  9. #if user in user_list and pword == password:
  10. if user1 in user_list and user2 in user_list and user1 != user2:
  11.     print("youre in the auth user list")
  12.     pword= input("What's the password? >>")
  13.     if pword == password:
  14.         print("Password OK")
  15.         print("Users and password ok")
  16.     else:
  17.         print("Password not ok...  exiting")
  18.         exit()
  19. else:
  20.     print("User(s) Not in the list")
  21.     exit()
  22.    
  23. ## try three atempts on password
  24. ## separate password
  25. ## password complexity (Aa1* certain length)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement