Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.29 KB | None | 0 0
  1. while c == 0:
  2. print ("Please login!") ## This is indented here, it wont show up here :/
  3. while d == 0:
  4. usernametest = "";
  5. usernametest = input("Please enter your username: ")
  6. if username.strip() != "": ## first user signed up
  7. if username2.strip() != "": ## 2 users signed up
  8. if username3.strip() != "": ## 3 users signed up
  9. if usernametest != username or username2 or username3:
  10. print("Username not recognised!")
  11.  
  12. else:
  13. if usernametest == username3: #checking user 3 login
  14. print("Username accepted!")
  15. passwordtest = input("Please enter your password")
  16. if passwordtest != password3:
  17. print("Password incorrect, please try again")
  18. else:
  19. print("Password Accepted!")
  20. print("------------------")
  21. print("Successfully logged in!")
  22. d = 1;
  23. c = 1;
  24. useaccount = 3;
  25. break
  26. elif usernametest == username2: #checking user 2 login
  27. print("Username accepted!")
  28. passwordtest = input("Please enter your password: ")
  29. if passwordtest != password2:
  30. print("Password incorrect, please try again!")
  31. else:
  32. print("Password Accepted!")
  33. print("------------------")
  34. print("Successfully logged in!")
  35. d = 1;
  36. c = 1;
  37. useaccount = 2;
  38. break
  39. elif usernametest == username: # checking user 1 login
  40. print("Username accepted!")
  41. passwordtest = input("Please enter your password: ")
  42. if passwordtest != password:
  43. print("Password incorrect, please try again!")
  44. else:
  45. print("Password Accepted!")
  46. print("------------------")
  47. print("Successfully logged in!")
  48. d = 1;
  49. c = 1;
  50. useaccount = 1;
  51. break
  52. if usernametest != username or username2: #checking user 2 login
  53. print("Username not recognised!")
  54. else:
  55. if usernametest == username2:
  56. print("Username accepted!")
  57. passwordtest = input("Please enter your password: ")
  58. if passwordtest != password2:
  59. print("Password incorrect, please try again!")
  60. else:
  61. print("Password Accepted!")
  62. print("------------------")
  63. print("Successfully logged in!")
  64. d = 1;
  65. c = l;
  66. useaccount = 2;
  67. break
  68. elif usernametest == username: # checking user 1 login
  69. print("Username accepted!")
  70. passwordtest = input("Please enter your password: ")
  71. if passwordtest != password:
  72. print("Password incorrect, please try again!")
  73. else:
  74. print("Password Accepted!")
  75. print("------------------")
  76. print("Successfully logged in!")
  77. d = 1;
  78. c = 1;
  79. useaccount = 1;
  80. break
  81.  
  82. if usernametest != username: # checking user 1 login
  83. print("Username not recognised!")
  84. else:
  85. print("Username accepted!")
  86. passwordtest = input("Please enter your password: ")
  87. if passwordtest != password:
  88. print("Password incorrect, please try again!")
  89. else:
  90. print("Password Accepted!")
  91. print("------------------")
  92. print("Successfully logged in!")
  93. d = 1;
  94. c = 1;
  95. useaccount = 1;
  96. break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement