Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

created a new password checker file #1628

Merged
merged 1 commit into from
Oct 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
l, u, p, d = 0, 0, 0, 0
s = "we_lov3_h@ct0ber"
if (len(s) >= 8):
for i in s:

# counting lowercase alphabets in the given password
if (i.islower()):
l+=1

# counting uppercase alphabets in the given password
if (i.isupper()):
u+=1

# counting digits in the given password
if (i.isdigit()):
d+=1

# counting the mentioned special characters
if(i=='@'or i=='$' or i=='_'):
p+=1
if (l>=1 and u>=1 and p>=1 and d>=1 and l+p+u+d==len(s)):
print("Valid Password!")
else:
print("Invalid Password")