





"""simple docstring"""



def 		__lowercase					(       snake_case_  :  str						)       ->bool:



    '''simple docstring'''







    return credit_card_number.startswith(('''34''', '''35''', '''37''', '''4''', '''5''', '''6''')						)







def 		__lowercase					(       snake_case_  :  str						)       ->bool:



    '''simple docstring'''







    __A   :						Union[str, Any]									=					credit_card_number
    __A   :						int									=					0
    __A   :						str									=					len(lowercase__						) - 2
    for i in range(lowercase__    ,-1    ,-2						):
        #  double the value of every second digit
        __A   :						int									=					int(cc_number[i]						)
        digit *= 2
        # If doubling of a number results in a two digit number
        # i.e greater than 9(e.g., 6 × 2 = 12),
        # then add the digits of the product (e.g., 12: 1 + 2 = 3, 15: 1 + 5 = 6),
        # to get a single digit number.
        if digit > 9:
            digit %= 10
            digit += 1
        __A   :						str									=					cc_number[:i] + str(lowercase__						) + cc_number[i + 1 :]
        total += digit

    # Sum up the remaining digits
    for i in range(len(lowercase__						) - 1    ,-1    ,-2						):
        total += int(cc_number[i]						)

    return total % 10 == 0







def 		__lowercase					(       snake_case_  :  str						)       ->bool:



    '''simple docstring'''







    __A   :						int									=					F"""{credit_card_number} is an invalid credit card number because"""
    if not credit_card_number.isdigit():
        print(F"""{error_message} it has nonnumerical characters."""						)
        return False

    if not 13 <= len(lowercase__						) <= 16:
        print(F"""{error_message} of its length."""						)
        return False

    if not validate_initial_digits(lowercase__						):
        print(F"""{error_message} of its first two digits."""						)
        return False

    if not luhn_validation(lowercase__						):
        print(F"""{error_message} it fails the Luhn check."""						)
        return False

    print(F"""{credit_card_number} is a valid credit card number."""						)
    return True


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       validate_credit_card_number("""4111111111111111""")
       validate_credit_card_number("""32323""")











"""simple docstring"""



a_			=      {
    """meter""": """m""",
    """kilometer""": """km""",
    """megametre""": """Mm""",
    """gigametre""": """Gm""",
    """terametre""": """Tm""",
    """petametre""": """Pm""",
    """exametre""": """Em""",
    """zettametre""": """Zm""",
    """yottametre""": """Ym""",
}
# Exponent of the factor(meter)
a_			=      {
    """m""": 0,
    """km""": 3,
    """Mm""": 6,
    """Gm""": 9,
    """Tm""": 12,
    """Pm""": 15,
    """Em""": 18,
    """Zm""": 21,
    """Ym""": 24,
}







def 		__lowercase					(       snake_case_  :  float    ,snake_case_  :  str    ,snake_case_  :  str						)       ->float:



    '''simple docstring'''







    __A   :						Tuple									=					from_type.lower().strip('''s'''						)
    __A   :						Optional[int]									=					to_type.lower().strip('''s'''						)

    __A   :						List[str]									=					UNIT_SYMBOL.get(snake_case_    ,snake_case_						)
    __A   :						Any									=					UNIT_SYMBOL.get(snake_case_    ,snake_case_						)

    if from_sanitized not in METRIC_CONVERSION:
        __A   :						int									=					(
            F"""Invalid 'from_type' value: {from_type!r}.\n"""
            F"""Conversion abbreviations are: {', '.join(snake_case_						)}"""
        )
        raise ValueError(snake_case_						)
    if to_sanitized not in METRIC_CONVERSION:
        __A   :						str									=					(
            F"""Invalid 'to_type' value: {to_type!r}.\n"""
            F"""Conversion abbreviations are: {', '.join(snake_case_						)}"""
        )
        raise ValueError(snake_case_						)
    __A   :						Optional[Any]									=					METRIC_CONVERSION[from_sanitized]
    __A   :						Optional[int]									=					METRIC_CONVERSION[to_sanitized]
    __A   :						Union[str, Any]									=					1

    if from_exponent > to_exponent:
        __A   :						Dict									=					from_exponent - to_exponent
    else:
        __A   :						Union[str, Any]									=					-(to_exponent - from_exponent)

    return value * pow(10    ,snake_case_						)


if __name__ == "__main__":
       from doctest import testmod

       testmod()




