Created
February 17, 2021 15:10
-
-
Save collinsrj/ebba56c05695dc6ef2a0c7d76ce31b1f to your computer and use it in GitHub Desktop.
week 2 exercise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
users = [ | |
{'username': 'dz88', 'password': 'super-secret'}, | |
{'username': 'DogL0ver42', 'password': 'mydogsnameisfreckles'}, | |
{'username': 'punkrock3rgir1', 'password': 'joeyramone4lyfe'}] | |
not_logged_in=True | |
attempt_count=0 | |
while not_logged_in and attempt_count < 3: | |
username = input('Enter your username: ') | |
password = input('Enter your password: ') | |
for user in users: | |
if user["username"] == username: | |
# Check if the password matches |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment