


'''simple docstring'''




from __future__ import annotations

from collections.abc import Callable

def 			__UpperCamelCase    (    _A    :				Callable[[int | float], int | float]					,   _A    :				int | float					,   _A    :				int | float					,   _A    :				int = 1_00					,   )    ->      float:




	"""simple docstring"""





	lowerCAmelCase					:    List[str]      							= x_start
	lowerCAmelCase					:    Tuple      							= fnc(_A				)
	lowerCAmelCase					:    Optional[int]      							= 0.0
	for _ in range(_A				):
		# Approximates small segments of curve as linear and solve
		# for trapezoidal area
		lowerCAmelCase					:    List[str]      							= (x_end - x_start) / steps + xa
		lowerCAmelCase					:    Tuple      							= fnc(_A				)
		area += abs(fxa + fxa				) * (xa - xa) / 2
		# Increment step
		lowerCAmelCase					:    List[str]      							= xa
		lowerCAmelCase					:    int      							= fxa
	return area


if __name__ == "__main__":

				def 			__UpperCamelCase    (    _A    :				Union[str, Any]				)    ->      Tuple:




					"""simple docstring"""





					return x**3 + x**2

				print('f(x) = x^3 + x^2')
				print('The area between the curve, x = -5, x = 5 and the x axis is:')
				_lowerCAmelCase  :		int		     =	10
				while i <= 10_0000:
								print(f"""with {i} steps: {trapezoidal_area(f, -5, 5, i)}""")
								i *= 10




'''simple docstring'''




def 			__UpperCamelCase    (    _A    :				int				)    ->      bool:




	"""simple docstring"""





	return number & 1 == 0


if __name__ == "__main__":
				import doctest

				doctest.testmod()
