


"""simple docstring"""
from collections.abc import Callable

__SCREAMING_SNAKE_CASE				:     List[str]		=     Callable[[float], float]  # type alias for a real -> real function







def     _a					(   _SCREAMING_SNAKE_CASE					,			_SCREAMING_SNAKE_CASE					,			_SCREAMING_SNAKE_CASE					,			)     ->					float:
							snake_case_     							=		float(__UpperCamelCase					)
							while True:
														try:
																					snake_case_     							=		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
														snake_case_     							=		next_guess







def     _a					(   _SCREAMING_SNAKE_CASE					)     ->					float:
							return (x**3) - (2 * x) - 5







def     _a					(   _SCREAMING_SNAKE_CASE					)     ->					float:
							return 3 * (x**2) - 2


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





"""simple docstring"""


def        _lowerCamelCase(__UpperCamelCase = 20			)							->					int:

	try:
		_lowerCAmelCase								=int(__UpperCamelCase			)
	except (TypeError, ValueError):
		raise TypeError("""Parameter n must be int or castable to int."""			)
	if n <= 0:
		raise ValueError("""Parameter n must be greater than or equal to one."""			)
	_lowerCAmelCase								=0
	while 1:
		i += n * (n - 1)
		_lowerCAmelCase								=0
		for j in range(2       ,					__UpperCamelCase			):
			if i % j != 0:
				_lowerCAmelCase								=1
				break
		if nfound == 0:
			if i == 0:
				_lowerCAmelCase								=1
			return i
	return None


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



