Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. loop = 1
  2. users = []
  3. def menu():
  4. print "Hello, and welcome to Uplink International. If you already have an\
  5. account, press 1 to create an account, or if you are already a user,\
  6. press 2 to log in. Press 0 to exit."
  7. print " "
  8. choice = input('What would you like to do? ')
  9. print ""
  10. return choice
  11. while loop == 1:
  12. choice = menu()
  13. if choice == 0:
  14. print "Goodbye."
  15. exit
  16. elif choice == 1:
  17. print "Please enter your desired username and password (case sensitive)."
  18. print " "
  19. username = raw_input('Username: ')
  20. password = raw_input('Password: ')
  21. users.append([username, password])
  22. print "Account successfully created!"
  23. print " "
  24. loop = 1
  25. elif choice == 2:
  26. username = raw_input('Username: ')
  27. password = raw_input('Password: ')
  28. if [username, password] in users:
  29. print "DING DING DING DING DING! Access granted, you rock!"
  30. print " "
  31. else:
  32. print "Invalid username or password. DENIED!"
  33. print " "
  34. loop = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement