-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create 8.1.1 Project: Password Authenticator
- Loading branch information
CodeHS-Solutions
authored
Jan 20, 2024
1 parent
e81706c
commit b3c3e47
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
Unit 8: Password Authenticator/8.1.1 Project: Password Authenticator
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
print("Password Authentication Program:") | ||
|
||
# This is the original password being compared. | ||
authentication = "qwerty" | ||
|
||
# The password is checked in the for loop. | ||
for i in range(3): | ||
password = input("Enter your password: \n") | ||
|
||
if(password == authentication): | ||
print("Access Granted") | ||
break | ||
else: | ||
print("Incorrect Password.") | ||
if(password != authentication): | ||
print("The maximum number of attempts has been reached.") | ||
print("Acces Denied") |