Advertisement
jimmyhuynz

python error #1

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