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
50 changes: 50 additions & 0 deletions Python/PasswordStrengthChecker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
\# 🔐 Password Strength Checker (Python)



A simple Python tool that helps users test the strength of their passwords 💪

Perfect for beginners learning string manipulation and regular expressions.



\## 💡 Features

\- Checks if a password meets essential security standards:

  - Minimum 8 characters

  - Contains uppercase and lowercase letters

  - Includes at least one number

  - Includes at least one special symbol (`@, $, !, %, \*, ?, \&`)

\- Provides feedback as:

  - \*\*Strong 💪\*\*

  - \*\*Moderate 👍\*\*

  - \*\*Weak ⚠️\*\*



\## 🧠 Concepts Used

\- Regular Expressions (`re` module)

\- Conditional Statements

\- Loops and User Input



\## ▶️ How to Run

```bash

python password\_strength\_checker.py



30 changes: 30 additions & 0 deletions Python/PasswordStrengthChecker/password_strength_checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import re

def check_password_strength(password):
# Criteria checks
length_error = len(password) < 8
digit_error = re.search(r"\d", password) is None
uppercase_error = re.search(r"[A-Z]", password) is None
lowercase_error = re.search(r"[a-z]", password) is None
symbol_error = re.search(r"[@$!%*?&]", password) is None

# Count how many conditions failed
errors = sum([length_error, digit_error, uppercase_error, lowercase_error, symbol_error])

if errors == 0:
return "Strong 💪"
elif errors <= 2:
return "Moderate 👍"
else:
return "Weak ⚠️"

if __name__ == "__main__":
print("🔐 Password Strength Checker")
print("Your password should include uppercase, lowercase, digits, and special symbols.\n")

while True:
pwd = input("Enter a password (or type 'exit' to quit): ")
if pwd.lower() == 'exit':
print("Goodbye! 👋")
break
print(f"Password strength: {check_password_strength(pwd)}\n")