


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


if __name__ == "__main__":
     print(F'''{decimal_to_fraction(2) = }''')
     print(F'''{decimal_to_fraction(89.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') = }''')








from math import isclose, sqrt


def   _SCREAMING_SNAKE_CASE	( SCREAMING_SNAKE_CASE ,			SCREAMING_SNAKE_CASE ,			SCREAMING_SNAKE_CASE       ):
  A_      :				List[str]		     =					point_y / 4 / point_x
  A_      :				Union[str, Any]		     =					2 * normal_gradient / (1 + normal_gradient * normal_gradient)
  A_      :				int		     =					(1 - normal_gradient * normal_gradient) / (
      1 + normal_gradient * normal_gradient
  )
  A_      :				List[str]		     =					(sa - ca * incoming_gradient) / (ca + sa * incoming_gradient)

  # to find the next point, solve the simultaeneous equations:
  # y^2 + 4x^2 = 100
  # y - b = m * (x - a)
  # ==> A x^2 + B x + C = 0
  A_      :				List[str]		     =					outgoing_gradient**2 + 4
  A_      :				List[str]		     =					2 * outgoing_gradient * (point_y - outgoing_gradient * point_x)
  A_      :				Any		     =					(point_y - outgoing_gradient * point_x) ** 2 - 100

  A_      :				str		     =					(
      -linear_term - sqrt(linear_term**2 - 4 * quadratic_term * constant_term       )
  ) / (2 * quadratic_term)
  A_      :				Any		     =					(
      -linear_term + sqrt(linear_term**2 - 4 * quadratic_term * constant_term       )
  ) / (2 * quadratic_term)

  # two solutions, one of which is our input point
  A_      :				int		     =					x_minus if isclose(SCREAMING_SNAKE_CASE ,			SCREAMING_SNAKE_CASE       ) else x_plus
  A_      :				Any		     =					point_y + outgoing_gradient * (next_x - point_x)

  return next_x, next_y, outgoing_gradient


def   _SCREAMING_SNAKE_CASE	( SCREAMING_SNAKE_CASE = 1.4 ,			SCREAMING_SNAKE_CASE = -9.6       ):
  A_      :				int		     =					0
  A_      :				float		     =					first_x_coord
  A_      :				float		     =					first_y_coord
  A_      :				float		     =					(1_0.1 - point_y) / (0.0 - point_x)

  while not (-0.0_1 <= point_x <= 0.0_1 and point_y > 0):
    A_     ,       A_     ,       A_      :				List[str]		     =					next_point(SCREAMING_SNAKE_CASE ,			SCREAMING_SNAKE_CASE ,			SCREAMING_SNAKE_CASE       )
    num_reflections += 1

  return num_reflections


if __name__ == "__main__":
     print(F'''{solution() = }''')




