



from collections.abc import Callable

lowercase_  =   Callable[[float], float]  # type alias for a real -> real function



def __lowerCAmelCase       (   SCREAMING_SNAKE_CASE_  ,     SCREAMING_SNAKE_CASE_  ,     SCREAMING_SNAKE_CASE_  ,     ):
			lowercase__         = float(_UpperCAmelCase     )
			while True:
						try:
									lowercase__         = prev_guess - function(_UpperCAmelCase     ) / derivative(_UpperCAmelCase     )
						except ZeroDivisionError:
									raise ZeroDivisionError("Could not find root"     ) from None
						if abs(prev_guess - next_guess     ) < 10**-5:
									return next_guess
						lowercase__         = next_guess



def __lowerCAmelCase       (   SCREAMING_SNAKE_CASE_     ):
			return (x**3) - (2 * x) - 5



def __lowerCAmelCase       (   SCREAMING_SNAKE_CASE_     ):
			return 3 * (x**2) - 2


if __name__ == "__main__":
							print(newton(f, fa, 3))











def    _lowercase    (  _UpperCAmelCase = 99_80_01 )  ->     int:

				# fetches the next number
				for number in range(n - 1	,					99_99	,					-1 ):
								lowerCamelCase		       =str(_UpperCAmelCase )

								# checks whether 'str_number' is a palindrome.
								if str_number == str_number[::-1]:
												lowerCamelCase		       =9_99

												# if 'number' is a product of two 3-digit numbers
												# then number is the answer otherwise fetch next number.
												while divisor != 99:
																if (number % divisor == 0) and (len(str(number // divisor ) ) == 3.0):
																				return number
																divisor -= 1
				raise ValueError("""That number is larger than our acceptable range.""" )


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





