Advertisement
Guest User

Untitled

a guest
Aug 30th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. == dict[username] hoài
  2. error -----------------------
  3. File "authentication.py", line 8
  4. if password == dict[username]:
  5. ^
  6. IndentationError: unindent does not match any outer indentation level
  7. code------------------------
  8. dict = {'jimmy':'P@ssw0rd',
  9. 'bob':'Abc123',
  10. 'susie':'susie123',
  11. 'thuong': '#n1'}
  12. print('please enter your username: ')
  13. username = input()
  14. if username in dict:
  15. print('Hello again ' + username)
  16. print('please enter your password: ')
  17. password = input()
  18. if password == dict[username]:
  19. print('ACCESS GRANTED')
  20. else:
  21. print('Incorrected password')
  22. print('ACCESS DENIED')
  23. else:
  24. print('No such user')
  25. print('ACCESS DENIED')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement