# FOR IF Mini Project — Password Strength Checker
# for + if — check every character, track what you find

# ─────────────────────────────────────────────
# Character type methods
# ─────────────────────────────────────────────

print("A".isupper())    # True
print("a".islower())    # True
print("3".isdigit())    # True

char = "@"
print(not char.isalpha() and not char.isdigit())    # True — special character

# ─────────────────────────────────────────────
# Password Strength Checker
# ─────────────────────────────────────────────

password = input("Enter a password: ")

has_upper   = False
has_lower   = False
has_digit   = False
has_special = False

for char in password:
    if char.isupper():
        has_upper = True
    elif char.islower():
        has_lower = True
    elif char.isdigit():
        has_digit = True
    elif not char.isalpha() and not char.isdigit():
        has_special = True

print(f"Uppercase:         {'✓' if has_upper else '✗'}")
print(f"Lowercase:         {'✓' if has_lower else '✗'}")
print(f"Digit:             {'✓' if has_digit else '✗'}")
print(f"Special character: {'✓' if has_special else '✗'}")

if has_upper and has_lower and has_digit and has_special:
    print("Strong password.")
else:
    print("Weak password. Keep improving it.")

# ─────────────────────────────────────────────
# Test it
# ─────────────────────────────────────────────

# Enter a password: abc123
# Uppercase:         ✗
# Lowercase:         ✓
# Digit:             ✓
# Special character: ✗
# Weak password. Keep improving it.

# Enter a password: P@ssw0rd!
# Uppercase:         ✓
# Lowercase:         ✓
# Digit:             ✓
# Special character: ✓
# Strong password.

# ─────────────────────────────────────────────
# Go further
# ─────────────────────────────────────────────

# Add a minimum length check — at least 8 characters
# Add a score — 1 point per condition met, print "Score: 3/4"
# Use break to stop as soon as all four conditions are met
