


_snake_case					=					10_00






def 		lowercase_(  SCREAMING_SNAKE_CASE_     ):


  '''simple docstring'''

  return x * x






def 		lowercase_(  SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_ = 4     ):


  '''simple docstring'''

  assert callable(
      SCREAMING_SNAKE_CASE_     ), f"""the function(object) passed should be callable your input : {function}"""
  assert isinstance(SCREAMING_SNAKE_CASE_				,						(float, int)     ), f"""a should be float or integer your input : {a}"""
  assert isinstance(function(SCREAMING_SNAKE_CASE_     )				,						(float, int)     ), (
      "the function should return integer or float return type of your function, "
      f"""{type(SCREAMING_SNAKE_CASE_     )}"""
  )
  assert isinstance(SCREAMING_SNAKE_CASE_				,						(float, int)     ), f"""b should be float or integer your input : {b}"""
  assert (
      isinstance(SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_     ) 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

  lowerCamelCase			: List[Any]   =    (b - a) / N_STEPS
  lowerCamelCase			: List[str]   =    function(SCREAMING_SNAKE_CASE_     ) + function(SCREAMING_SNAKE_CASE_     )

  for i in range(1				,						SCREAMING_SNAKE_CASE_     ):
    lowerCamelCase			: List[str]   =    a + h * i
    result += function(SCREAMING_SNAKE_CASE_     ) * (4 if i % 2 else 2)

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


if __name__ == "__main__":
   import doctest

   doctest.testmod()







def 		lowercase_(  SCREAMING_SNAKE_CASE_     ):


  '''simple docstring'''

  if number != int(SCREAMING_SNAKE_CASE_     ):
    raise ValueError("factorial() only accepts integral values"     )
  if number < 0:
    raise ValueError("factorial() not defined for negative values"     )
  lowerCamelCase			: Optional[Any]   =    1
  for i in range(1				,						number + 1     ):
    value *= i
  return value






def 		lowercase_(  SCREAMING_SNAKE_CASE_     ):


  '''simple docstring'''

  if not isinstance(SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_     ):
    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()

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



