File tree Expand file tree Collapse file tree
Password Strength Checker Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Password Strength Checker
2+
3+ ## Description
4+ This is a simple Python script that checks whether a password is strong or weak based on common password security rules.
5+
6+ ## Features
7+ The program checks if the password contains:
8+
9+ - Minimum 8 characters
10+ - At least one uppercase letter
11+ - At least one lowercase letter
12+ - At least one digit
13+ - At least one special character
14+
15+ ## Technologies Used
16+ - Python
17+ - String methods
18+ - Conditional statements
19+ - Loops
20+
21+ ## How to Run
22+
23+ 1 . Open terminal in the project folder
24+ 2 . Run the script in python environment
25+ 3 . Enter the desired Password to check its strength
26+ 4 . The script will classify the password as Strong or Weak.
Original file line number Diff line number Diff line change 1+ password = input ("Enter your password: " )
2+
3+ has_upper = False
4+ has_lower = False
5+ has_digit = False
6+ has_special = False
7+
8+ for char in password :
9+
10+ if char .isupper ():
11+ has_upper = True
12+
13+ elif char .islower ():
14+ has_lower = True
15+
16+ elif char .isdigit ():
17+ has_digit = True
18+
19+ elif not char .isalnum ():
20+ has_special = True
21+
22+
23+ if len (password ) >= 8 and has_upper and has_lower and has_digit and has_special :
24+
25+ print ("Strong Password" )
26+
27+ else :
28+
29+ print ("Weak Password" )
30+
You can’t perform that action at this time.
0 commit comments