Guest User

Untitled

a guest
Oct 20th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. import sys
  2. login = {"Admin":"Pass", "Standard":"User"}
  3.  
  4.  
  5. while 1:
  6. while 1:
  7. User = raw_input("Hello, what is your Username? ")
  8. if User in login:
  9. Pass = raw_input("Hello " + User + " what is your Password? ")
  10. if login[User] == Pass:
  11. print"Welcome " + User
  12. break
  13.  
  14. else:
  15. print"Attempt failed"
  16.  
  17.  
  18.  
  19. else:
  20. answer = raw_input("It seems you don't have an account, would you like to make one? Y/n ")
  21. if answer == "y":
  22. NewU = raw_input("New Username is: ")
  23. if NewU in login.keys():
  24. print"No go"
  25.  
  26. else:
  27. NewP = raw_input("New Password is: ")
  28. login[NewU] = NewP
  29. print login
  30. if answer == "n":
  31. print"Well fuck you then"
  32. raw_input("Press enter")
  33. sys.exit()
  34.  
  35. else:
  36. print"Die"
  37.  
  38. while 1:
  39. a = raw_input("""What would you like to do next?
  40. d - Delete profile
  41. c - Create another profile
  42. s - Show all values of login
  43. o - Sign out
  44. """)
  45. if a == "d":
  46. del login[User]
  47. print login
  48. break
  49. if a == "c":
  50. NewU = raw_input("New Username: ")
  51. if NewU in login.keys():
  52. print("Sorry, name is taken. Try again.")
  53. pass
  54. else:
  55. NewP = raw_input("New Password: ")
  56. login[NewU] = NewP
  57.  
  58. if a == "s":
  59. print login
  60.  
  61. if a == "o":
  62. break
Add Comment
Please, Sign In to add comment