Guest User

Untitled

a guest
Apr 18th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. username pass 1
  2. usereman ssap 2
  3. nameuser psap 1
  4.  
  5. def login():
  6. print("nYou're in login section")
  7. username = input("Username: ")
  8. password = input("Password: ")
  9. for line in open("users.txt", "r").readlines():
  10. login_info = line.split()
  11. if username == login_info[0] and password == login_info[1]:
  12. if login_info[2] == 1:
  13. print("Dear customer, I'll take you to the marketplace.")
  14. return True
  15. elif login_info[2] == 2:
  16. print("Welcome manager!")
  17. return True
  18. else:
  19. print("Authority level is other than 1 or 2. Fix it!")
  20. welcome()
Add Comment
Please, Sign In to add comment