Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- == dict[username] hoài
- error -----------------------
- File "authentication.py", line 8
- if password == dict[username]:
- ^
- IndentationError: unindent does not match any outer indentation level
- code------------------------
- dict = {'jimmy':'P@ssw0rd',
- 'bob':'Abc123',
- 'susie':'susie123',
- 'thuong': '#n1'}
- print('please enter your username: ')
- username = input()
- if username in dict:
- print('Hello again ' + username)
- print('please enter your password: ')
- password = input()
- if password == dict[username]:
- print('ACCESS GRANTED')
- else:
- print('Incorrected password')
- print('ACCESS DENIED')
- else:
- print('No such user')
- print('ACCESS DENIED')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement