from collections.abc import Callable

_lowerCamelCase    :      Optional[int]	 =						Callable[[float], float]  # type alias for a real -> real function





def 		__lowerCamelCase							(UpperCAmelCase__   :							RealFunc					,       UpperCAmelCase__   :							RealFunc					,       UpperCAmelCase__   :							int					,       ):
					SCREAMING_SNAKE_CASE				=				float(UpperCAmelCase__     )
					while True:
										try:
															SCREAMING_SNAKE_CASE				=				prev_guess - function(UpperCAmelCase__     ) / derivative(UpperCAmelCase__     )
										except ZeroDivisionError:
															raise ZeroDivisionError("Could not find root"     ) from None
										if abs(prev_guess - next_guess     ) < 1_0**-5:
															return next_guess
										SCREAMING_SNAKE_CASE				=				next_guess





def 		__lowerCamelCase							(UpperCAmelCase__   :							float     ):
					return (x**3) - (2 * x) - 5





def 		__lowerCamelCase							(UpperCAmelCase__   :							float     ):
					return 3 * (x**2) - 2


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





import math





def 		__lowerCamelCase							(UpperCAmelCase__   :							int     ):

					if 1 < number < 4:
										# 2 and 3 are primes
										return True
					elif number < 2 or number % 2 == 0 or number % 3 == 0:
										# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
										return False

					# All primes number are in format of 6k +/- 1
					for i in range(5					,       int(math.sqrt(UpperCAmelCase__     ) + 1     )					,       6     ):
										if number % i == 0 or number % (i + 2) == 0:
															return False
					return True





def 		__lowerCamelCase							(UpperCAmelCase__   :							int = 2_0_0_0_0_0_0     ):
					return sum(num for num in range(3					,       UpperCAmelCase__					,       2     ) if is_prime(UpperCAmelCase__     )     ) + 2 if n > 2 else 0


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




