






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      UpperCAmelCase						( lowerCAmelCase__					,     lowerCAmelCase__	):


		'''simple docstring'''

		if n < 0:
				return 0
		# table[i] represents the number of ways to get to amount i
		__A    =							[0] * (n + 1)

		# There is exactly 1 way to get to zero(You pick no coins).
		__A    =							1

		# Pick all coins one by one and update table[] values
		# after the index greater than or equal to the value of the
		# picked coin
		for coin_val in s:
				for j in range(lowerCAmelCase__					,     n + 1	):
						table[j] += table[j - coin_val]

		return table[n]


if __name__ == "__main__":
					import doctest

					doctest.testmod()

