


from __future__ import annotations

from collections.abc import Callable
def 							UpperCamelCase_  (				__snake_case			:						Callable[[int | float], int | float]	,			__snake_case			:						int | float	,			__snake_case			:						int | float	,			__snake_case			:						int = 1_00	,			)->      float:




						'''simple docstring'''
						__magic_name__ 		=			x_start
						__magic_name__ 		=			fnc(__snake_case     )
						__magic_name__ 		=			0.0

						for _ in range(__snake_case     ):
												# Approximates small segments of curve as linear and solve
												# for trapezoidal area
												__magic_name__ 		=			(x_end - x_start) / steps + xa
												__magic_name__ 		=			fnc(__snake_case     )
												area += abs(fxa + fxa     ) * (xa - xa) / 2

												# Increment step
												__magic_name__ 		=			xa
												__magic_name__ 		=			fxa
						return area


if __name__ == "__main__":
					def 							UpperCamelCase_  (				__snake_case			:						str     )->      int:




											'''simple docstring'''
											return x**3

					print('''f(x) = x^3''')
					print('''The area between the curve, x = -10, x = 10 and the x axis is:''')
					UpperCamelCase :				Optional[Any]						    =       10
					while i <= 100_000:
										UpperCamelCase :				Dict						    =       trapezoidal_area(f, -5, 5, i)
										print(f'''with {i} steps: {area}''')
										i *= 10





def 							UpperCamelCase_  (				__snake_case			:						int     )->      bool:




						'''simple docstring'''
						if not isinstance(__snake_case	,			__snake_case     ):
												__magic_name__ 		=			F'''Input value of [number={number}] must be an integer'''
												raise TypeError(__snake_case     )
						if number < 0 or number % 2 == 1:
												return False
						__magic_name__ 		=			int(number**0.5     )
						return number == number_sqrt * (number_sqrt + 1)


if __name__ == "__main__":
					import doctest

					doctest.testmod()

