


"""simple docstring"""





def      _snake_case						(						_snake_case				:			int | float | str			):
      try:
            lowerCAmelCase					:	int       =   float(_snake_case			)
      except ValueError:
            raise ValueError('''Please enter a valid number'''			)
      lowerCAmelCase					:	Union[str, Any]       =   decimal - int(_snake_case			)
      if fractional_part == 0:
            return int(_snake_case			), 1
      else:
            lowerCAmelCase					:	Dict       =   len(str(_snake_case			).split('''.'''			)[1]			)
            lowerCAmelCase					:	Tuple       =   int(decimal * (10**number_of_frac_digits)			)
            lowerCAmelCase					:	int       =   10**number_of_frac_digits
            lowerCAmelCase,      lowerCAmelCase					:	Tuple       =   denominator, numerator
            while True:
                  lowerCAmelCase					:	Optional[Any]       =   dividend % divisor
                  if remainder == 0:
                        break
                  lowerCAmelCase,      lowerCAmelCase					:	List[str]       =   divisor, remainder
            lowerCAmelCase,      lowerCAmelCase					:	Union[str, Any]       =   numerator / divisor, denominator / divisor
            return int(_snake_case			), int(_snake_case			)


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") = }""")






"""simple docstring"""





def      _snake_case						(						_snake_case				:			int ,   _snake_case				:			int			):
      return base * power(_snake_case ,   (exponent - 1)			) if exponent else 1


if __name__ == "__main__":
 print('''Raise base to the power of exponent using recursion...''')
 snake_case__		:     Union[str, Any]    				=				int(input('''Enter the base: ''').strip())
 snake_case__		:     Optional[Any]    				=				int(input('''Enter the exponent: ''').strip())
 snake_case__		:     Any    				=				power(base, abs(exponent))
 if exponent < 0:  # power() does not properly deal w/ negative exponents
  snake_case__		:     Dict    				=				1 / result
 print(f"""{base} to the power of {exponent} is {result}""")


