




'''simple docstring'''





from maths.prime_factors import prime_factors





def      __a     (       _UpperCamelCase:   int   )						->			int:

     """simple docstring"""




     if not isinstance(_UpperCamelCase ,						_UpperCamelCase   ):
          _snake_case							=				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 -1 if len(prime_factors(_UpperCamelCase   )   ) % 2 else 1


if __name__ == "__main__":
   import doctest

   doctest.testmod()








'''simple docstring'''





from __future__ import annotations

from collections.abc import Callable





def      __a     (       _UpperCamelCase:   Callable[[int | float], int | float] ,						_UpperCamelCase:   int | float ,						_UpperCamelCase:   int | float ,						_UpperCamelCase:   int = 100 ,						)						->			float:

     """simple docstring"""




     _snake_case							=				x_start
     _snake_case							=				fnc(_UpperCamelCase   )
     _snake_case							=				0.0
     for _ in range(_UpperCamelCase   ):
          # Approximates small segments of curve as linear and solve
          # for trapezoidal area
          _snake_case							=				(x_end - x_start) / steps + xa
          _snake_case							=				fnc(_UpperCamelCase   )
          area += abs(fxa + fxa   ) * (xa - xa) / 2
          # Increment step
          _snake_case							=				xa
          _snake_case							=				fxa
     return area


if __name__ == "__main__":





   def      __a     (       _UpperCamelCase:   Any   )						->			Optional[int]:

        """simple docstring"""




        return x**3 + x**2

   print('''f(x) = x^3 + x^2''')
   print('''The area between the curve, x = -5, x = 5 and the x axis is:''')
   UpperCamelCase_						:      Optional[int]       =						10
   while i <= 100000:
      print(F'with {i} steps: {trapezoidal_area(f, -5, 5, i)}')
      i *= 10


