Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- account = 'user'
- password1 = 'pass'
- while True:
- print('Please provide user name: ')
- username = input()
- if username == account:
- for t in range(3):
- print('Welcome ' + account + ' Please provide your password: ')
- password = input()
- if password == password1:
- print('Welcome ' + account)
- break
- else:
- print('Incorrect password.' + ' This is your ' + str(t + 1) + ' try.')
- if t == 3:
- print('You have entered an incorrect password for ' + account + ' You are logged out.')
- break
- else:
- print('User does not exist.')
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement