
"""
A class to check if a password is strong.
There are 5 rules to check if a password is strong:
1. Must contain at least 8 characters.
2. Must contain at least one uppercase letter.
3. Must contain at least one lowercase letter.
4. Must contain at least one number.
5. Must contain at least one special character (from `!@#$%^&*()`).
"""

special_chars = "!@#$%^&*()"


def check_len(password: str) -> bool:
    """Check if the password has at least 8 characters.

    Parameters:
        password (str): The password

    Returns:
        bool: True, if password contains at least 8 characters, False otherwise
    """
    return len(password) >= 8


def check_uppercase(password: str) -> bool:
    """
    Check if the password has at least one uppercase letter.
    :param password: str, the password
    :return: bool, True if the password has at least one uppercase letter, False otherwise
    """
    return any(char.isupper() for char in password)


def check_lowercase(password: str) -> bool:
    """
    Check if the password has at least one lowercase letter.
    :param password: str, the password
    :return: bool, True if the password has at least one lowercase letter, False otherwise
    """
    return any(char.islower() for char in password)


def check_number(password: str) -> bool:
    """
    Check if the password has at least one number.
    :param password: str, the password
    :return: bool, True if the password has at least one number, False otherwise
    """
    return any(char.isdigit() for char in password)


def check_special_char(password: str) -> bool:
    """
    Check if the password has at least one special character.
    :param password: str, the password
    :return: bool, True if the password has at least one special character, False otherwise
    """
    return any(char in special_chars for char in password)


def is_strong(password: str) -> bool:
    """
    Check if the password is strong.
    To be strong, the password must satisfy the 5 rules.
    :param password: str, the password
    :return: bool, True if the password is strong, False otherwise
    """
    return all([
        check_len(password),
        check_uppercase(password),
        check_lowercase(password),
        check_number(password),
        check_special_char(password)
    ])


if __name__ == '__main__':
    password = "StrongPassword123!"
    print(is_strong(password))