Skip to content
Open
Show file tree
Hide file tree
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
23 changes: 23 additions & 0 deletions Password-Strength-Checker/Password-Strength-Checker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Password Strength Checker

A Python program that evaluates password strength based on:

- Minimum length of 8 characters
- Uppercase letters
- Lowercase letters
- Numbers
- Special characters

## Example

Input:
Password@123

Output:
Strong Password

## How to Run

```bash
python password_strength_checker.py
```
29 changes: 29 additions & 0 deletions Password-Strength-Checker/password_strength_checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
def check_password_strength(password):
strength = 0

if len(password) >= 8:
strength += 1

if any(char.isupper() for char in password):
strength += 1

if any(char.islower() for char in password):
strength += 1

if any(char.isdigit() for char in password):
strength += 1

if any(char in "!@#$%^&*()_+-=[]{}|;:,.<>?/`~" for char in password):
strength += 1

if strength <= 2:
return "Weak Password"
elif strength <= 4:
return "Moderate Password"
else:
return "Strong Password"


password = input("Enter Password: ")
result = check_password_strength(password)
print("Password Strength:", result)