






def       _SCREAMING_SNAKE_CASE    (			__lowercase :      int | float | str     )    ->   tuple[int, int]:





    """simple docstring"""

    try:
        __A       =						float(__lowercase     )
    except ValueError:
        raise ValueError("""Please enter a valid number"""     )
    __A       =						decimal - int(__lowercase     )
    if fractional_part == 0:
        return int(__lowercase     ), 1
    else:
        __A       =						len(str(__lowercase     ).split("""."""     )[1]     )
        __A       =						int(decimal * (1_0**number_of_frac_digits)     )
        __A       =						1_0**number_of_frac_digits
        __A     ,						__A       =						denominator, numerator
        while True:
            __A       =						dividend % divisor
            if remainder == 0:
                break
            __A     ,						__A       =						divisor, remainder
        __A     ,						__A       =						numerator / divisor, denominator / divisor
        return int(__lowercase     ), int(__lowercase     )


if __name__ == "__main__":
  print(f"""{decimal_to_fraction(2) = }""")
  print(f"""{decimal_to_fraction(8_9.0) = }""")
  print(f"""{decimal_to_fraction('67') = }""")
  print(f"""{decimal_to_fraction('45.0') = }""")
  print(f"""{decimal_to_fraction(1.5) = }""")
  print(f"""{decimal_to_fraction('6.25') = }""")
  print(f"""{decimal_to_fraction('78td') = }""")












def       _SCREAMING_SNAKE_CASE    (			__lowercase :      int     )    ->   list[int]:





    """simple docstring"""

    if length <= 0 or not isinstance(__lowercase      ,					__lowercase     ):
        raise ValueError("""Length must be a positive integer."""     )
    return [n * (2 * n - 1) for n in range(__lowercase     )]


if __name__ == "__main__":
  print(hexagonal_numbers(length=5))
  print(hexagonal_numbers(length=10))




