
"""simple docstring"""




def __snake_case (      UpperCamelCase    )       ->    int:


		"""simple docstring"""





		if number != int(UpperCamelCase    ):
				raise ValueError('''factorial() only accepts integral values'''    )
		if number < 0:
				raise ValueError('''factorial() not defined for negative values'''    )
		a__   		=     1
		for i in range(1						,					number + 1    ):
				value *= i
		return value

def __snake_case (      UpperCamelCase    )       ->    int:


		"""simple docstring"""





		if not isinstance(UpperCamelCase						,					UpperCamelCase    ):
				raise ValueError('''factorial() only accepts integral values'''    )
		if n < 0:
				raise ValueError('''factorial() not defined for negative values'''    )
		return 1 if n == 0 or n == 1 else n * factorial(n - 1    )


if __name__ == "__main__":
					import doctest

					doctest.testmod()

					__lowerCAmelCase							:  Any 				=		int(input('''Enter a positive integer: ''').strip() or 0)
					print(f"factorial{n} is {factorial(n)}")








from typing import Callable




def   snake_case_	(    snake_case	)    ->							Tuple:

       def wrapper(snake_case	):
              lowercase__:  Tuple         =  function_with_docstring.__doc__
              return target_function

       return wrapper


