ASSIGNMENT
Q.6
Q.6 Write a Python program to check whether a password entered by the user is Strong or Weak.
password = input("Enter your password: ") has_upper = False has_lower = False has_digit = False has_special = False special_chars = "!@#$%^&*()-_=+[]{}|;:',.<>?/`~" for ch in password: if ch.isupper(): has_upper = True elif ch.islower(): has_lower = True elif ch.isdigit(): has_digit = True elif ch in special_chars: has_special = True if len(password) >= 8 and has_upper and has_lower and has_digit and has_special: print("Strong Password") else: print("Weak Password")


