================================================================================
  Question 10: Password Strength Checker
================================================================================

FULL QUESTION:
Scenario: You're developing a simple password strength checker.

Task:
1. Prompt the user to enter a password.
2. Implement the following conditions for password strength:
   - At least 8 characters long.
   - Contains at least one uppercase letter (A-Z).
   - Contains at least one lowercase letter (a-z).
   - Contains at least one digit (0-9).
   - Contains at least one special character (!@#$%^&* etc.).
3. Rate the password:
   - Weak: Fails length or has only 1-2 criteria satisfied.
   - Moderate: Meets length and 3 criteria.
   - Strong: Meets length and 4 criteria.
   - Very Strong: Meets all 5 criteria and length >= 12.
4. Provide specific feedback on missing requirements.

SHORT QUESTION:
Password strength validator evaluating length, casing, digits, and special characters with detailed feedback.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 10: Password Strength Checker

- Prerequisites: Python 3.x (Standard library string module).
- Setup: None.
- How to Run: python question_10.py
- Expected Behavior: Prompts user for a password, evaluates criteria, and displays rating and missing requirements.

================================================================================
SOURCE CODE FILES:
================================================================================

1. question_10.py
--------------------------------------------------------------------------------
import string

def check_password_strength():
    password = input("Enter a password to check its strength: ")

    has_length = len(password) >= 8
    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 char in string.punctuation:
            has_special = True

    missing_conditions = []

    if not has_length:
        missing_conditions.append("At least 8 characters long")
    if not has_upper:
        missing_conditions.append("At least one uppercase letter")
    if not has_lower:
        missing_conditions.append("At least one lowercase letter")
    if not has_digit:
        missing_conditions.append("At least one digit")
    if not has_special:
        missing_conditions.append("At least one special character")

    if not missing_conditions:
        print("Strong Password")
    else:
        print("Weak Password")
        print("Missing Requirements:")
        for condition in missing_conditions:
            print(f" - {condition}")

check_password_strength()
--------------------------------------------------------------------------------
