Guest User

Untitled

a guest
Sep 27th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. def loginSystem():
  2. # System Welcome Message
  3. print("Login System Initiated")
  4. print("Please Have Your Details Ready To Be Entered!")
  5.  
  6. # User Enters Their Details
  7. entUsername = input("Please Enter Your Username: ")
  8. entPassword = input("Please Enter Your Password: ")
  9.  
  10. print("Thank You.")
  11. print("Details Being Authenticated...")
  12.  
  13. # User + Pass Authentication
  14. file = open("AuthenticatedUsers.txt", "r")
  15. for line in file:
  16. username, password = line.split(",")
  17. if username == entUsername and password == entPassword:
  18. print("Authenticated User Detected")
  19. break
  20. else:
  21. print("Unauthenticated User Detected!")
  22. regQuestion = input("Would You Like To Register Now? [Y/N]: ")
  23. if regQuestion.lower().startswith("y"):
  24. registerSystem()
  25. else:
  26. print("--- Program Terminated ---")
Add Comment
Please, Sign In to add comment