
"""simple docstring"""


def       _snake_case				(		snake_case__   :     Any	,      snake_case__   :     Union[str, Any]     ):
	# "extended trapezoidal rule"
	# int(f) = dx/2 * (f1 + 2f2 + ... + fn)
	A						   =   (boundary[1] - boundary[0]) / steps
	A						   =   boundary[0]
	A						   =   boundary[1]
	A						   =   make_points(snake_case__	,      snake_case__	,      snake_case__     )
	A						   =   0.0
	y += (h / 2.0) * f(snake_case__     )
	for i in x_i:
		# print(i)
		y += h * f(snake_case__     )
	y += (h / 2.0) * f(snake_case__     )
	return y






def       _snake_case				(		snake_case__   :     List[Any]	,      snake_case__   :     Union[str, Any]	,      snake_case__   :     List[Any]     ):
	A						   =   a + h
	while x < (b - h):
		yield x
		A						   =   x + h






def       _snake_case				(		snake_case__   :     str     ):  # enter your function here
	A						   =   (x - 0) * (x - 0)
	return y






def       _snake_case				(		):
	A						   =   0.0  # Lower bound of integration
	A						   =   1.0  # Upper bound of integration
	A						   =   10.0  # define number of steps or resolution
	A						   =   [a, b]  # define boundary of integration
	A						   =   method_a(snake_case__	,      snake_case__     )
	print(F'y = {y}'     )


if __name__ == "__main__":
		main()

"""simple docstring"""


from math import pi, sqrt






def       _snake_case				(		snake_case__   :     float     ):
	if num <= 0:
		raise ValueError('math domain error'     )
	if num > 171.5:
		raise OverflowError('math range error'     )
	elif num - int(snake_case__     ) not in (0, 0.5):
		raise NotImplementedError('num must be an integer or a half-integer'     )
	elif num == 0.5:
		return sqrt(snake_case__     )
	else:
		return 1.0 if num == 1 else (num - 1) * gamma(num - 1     )






def       _snake_case				(		):
	assert gamma(0.5     ) == sqrt(snake_case__     )
	assert gamma(1     ) == 1.0
	assert gamma(2     ) == 1.0


if __name__ == "__main__":
		from doctest import testmod

		testmod()
		_lowercase							   =				1.0
		while num:
				_lowercase							   =				float(input('''Gamma of: '''))
				print(F"""gamma({num}) = {gamma(num)}""")
				print('''\nEnter 0 to exit...''')