






snake_case_   :	Optional[Any]							      =1000



def      UpperCAmelCase						( lowerCAmelCase__	):


		'''simple docstring'''

		return x * x



def      UpperCAmelCase						( lowerCAmelCase__					,     lowerCAmelCase__					,     lowerCAmelCase__					,     lowerCAmelCase__ = 4	):


		'''simple docstring'''

		assert callable(
		    lowerCAmelCase__	), F"""the function(object) passed should be callable your input : {function}"""
		assert isinstance(lowerCAmelCase__					,     (float, int)	), F"""a should be float or integer your input : {a}"""
		assert isinstance(function(lowerCAmelCase__	)					,     (float, int)	), (
		    "the function should return integer or float return type of your function, "
		    F"""{type(lowerCAmelCase__	)}"""
		)
		assert isinstance(lowerCAmelCase__					,     (float, int)	), F"""b should be float or integer your input : {b}"""
		assert (
		    isinstance(lowerCAmelCase__					,     lowerCAmelCase__	) and precision > 0
		), F"""precision should be positive integer your input : {precision}"""

		# just applying the formula of simpson for approximate integration written in
		# mentioned article in first comment of this file and above this function

		__A    =							(b - a) / N_STEPS
		__A    =							function(lowerCAmelCase__	) + function(lowerCAmelCase__	)

		for i in range(1					,     lowerCAmelCase__	):
				__A    =							a + h * i
				result += function(lowerCAmelCase__	) * (4 if i % 2 else 2)

		result *= h / 3
		return round(lowerCAmelCase__					,     lowerCAmelCase__	)


if __name__ == "__main__":
					import doctest

					doctest.testmod()








def  A					(				UpperCAmelCase					):
					if not isinstance(UpperCAmelCase	,	UpperCAmelCase					):
										_snake_case							:       Optional[Any]												= F"""Input value of [number={number}] must be an integer"""
										raise TypeError(UpperCAmelCase					)
					if number < 1:
										raise ValueError("Input must be a positive integer"					)
					return number * (2 * number - 1)


if __name__ == "__main__":
							import doctest

							doctest.testmod()