Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. def runUser():
  2. x = raw_input("Enter your username:")
  3. y = raw_input("Enter your password :")
  4. users = [x == "aeduun" and y == "1234", x == "paul" and y == "fifty"]
  5. raw_input("")
  6. if x == users[] and y == users[]:#x == "aeduun" and y == "1234":
  7. print "you are now logged in"
  8. elif x == "Mercuryisle" and y == "shrek":
  9. print "Your account has expired..."
  10. "You will now bw taken back to the login page"
  11. time.sleep(5)
  12. return runUser()
  13.  
  14. users = set([("aeduun","1234"), ("paul","fifty")])
  15. expired_users = set([("Mercuryisle", "shrek")])
  16. . . .
  17. if (x,y) in users:
  18. print "you are now logged in
  19. elif (x,y) in expired_users:
  20. print "Your account has expired..."
  21. . . .
  22.  
  23. def runUser():
  24. x = raw_input("Enter your username: ")
  25. y = raw_input("Enter your password: ")
  26. users = {"aeduun":"1234", "paul":"fifty"}
  27. raw_input("")
  28. if x in users:
  29. if y == users[x]:
  30. print "you are now logged in"
  31. elif x == "Mercuryisle" and y == "shrek":
  32. print "Your account has expired..."
  33. "You will now bw taken back to the login page"
  34. time.sleep(5)
  35. return runUser()
  36.  
  37. >>> runUser()
  38. Enter your username: aeduun
  39. Enter your password: 1234
  40.  
  41. you are now logged in
  42. Enter your username: Mercuryisle
  43. Enter your password: shrek
  44.  
  45. Your account has expired...You will now bw taken back to the login page
  46. Enter your username:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement