Guest User

Untitled

a guest
Jan 29th, 2018
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. def signIn():
  2. userEntry = raw_input("Please enter your username:")
  3. userEntry1 = raw_input("Please enter your password:")
  4. searchfile = open("user_account.txt", "r")
  5. for line in searchfile:
  6. if userEntry and userEntry1 in line:
  7. action = raw_input("Do you want to take a quiz or output reports?")
  8. if action.lower() == "take a quiz":
  9. takeQuiz()
  10. elif action.lower() == "output reports":
  11. reports()
  12. else:
  13. print "ERROR: RESTART PROGRAM."
  14. elif userEntry and userEntry1 not in line:
  15. print "ERROR: INCORRECT USERNAME OR PASSWORD."
Add Comment
Please, Sign In to add comment