1# Aim: Program to perform password strength check (Password Strength Check).
2def checkpass(password):
3 rate=0
4 length=len(password)
5
6 if length >= 8:
7 rate += 1
8 if any(char.isdigit() for char in password):
9 rate += 1
10 if any(char.islower() for char in password):
11 rate += 1
12 if any(char.isupper() for char in password):
13 rate += 1
14 if any(char in "!@#$%^&*()-_+=<>?{}[]|\/" for char in password):
15 rate += 1
16
17 return rate
18
19password = input("Enter a password: ")
20strength = checkpass(password)
21print(f"Password strength rate: {strength}")