Skip to content

Commit b3c3e47

Browse files
author
CodeHS-Solutions
authored
Create 8.1.1 Project: Password Authenticator
1 parent e81706c commit b3c3e47

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
print("Password Authentication Program:")
2+
3+
# This is the original password being compared.
4+
authentication = "qwerty"
5+
6+
# The password is checked in the for loop.
7+
for i in range(3):
8+
password = input("Enter your password: \n")
9+
10+
if(password == authentication):
11+
print("Access Granted")
12+
break
13+
else:
14+
print("Incorrect Password.")
15+
if(password != authentication):
16+
print("The maximum number of attempts has been reached.")
17+
print("Acces Denied")

0 commit comments

Comments
 (0)