




from __future__ import annotations

from collections.abc import Callable







def 	_a      (						SCREAMING_SNAKE_CASE_							:				Callable[[int | float], int | float]      ,      SCREAMING_SNAKE_CASE_							:				int | float      ,      SCREAMING_SNAKE_CASE_							:				int | float      ,      SCREAMING_SNAKE_CASE_							:				int = 1_00      ,      ):
					__lowerCAmelCase				   =       x_start
					__lowerCAmelCase				   =       fnc(SCREAMING_SNAKE_CASE_     )
					__lowerCAmelCase				   =       0.0
					for _ in range(SCREAMING_SNAKE_CASE_     ):
										# Approximates small segments of curve as linear and solve
										# for trapezoidal area
										__lowerCAmelCase				   =       (x_end - x_start) / steps + xa
										__lowerCAmelCase				   =       fnc(SCREAMING_SNAKE_CASE_     )
										area += abs(fxa + fxa     ) * (xa - xa) / 2
										# Increment step
										__lowerCAmelCase				   =       xa
										__lowerCAmelCase				   =       fxa
					return area


if __name__ == "__main__":







					def 	_a      (						SCREAMING_SNAKE_CASE_							:				Optional[Any]     ):
										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__    			=			10
					while i <= 100000:
										print(f'''with {i} steps: {trapezoidal_area(f, -5, 5, i)}''')
										i *= 10










def 			_SCREAMING_SNAKE_CASE			(							lowercase	:       list     ):


      '''simple docstring'''



      for i in range(len(lowercase     ) - 1	,							0	,							-1     ):
            lowerCamelCase_		     =    False

            for j in range(lowercase	,							0	,							-1     ):
                  if unsorted[j] < unsorted[j - 1]:
                        lowerCamelCase_     ,				lowerCamelCase_		     =    unsorted[j - 1], unsorted[j]
                        lowerCamelCase_		     =    True

            for j in range(lowercase     ):
                  if unsorted[j] > unsorted[j + 1]:
                        lowerCamelCase_     ,				lowerCamelCase_		     =    unsorted[j + 1], unsorted[j]
                        lowerCamelCase_		     =    True

            if not swapped:
                  break
      return unsorted


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 lowerCamelCase				:		Any     =   input("Enter numbers separated by a comma:\n").strip()
 lowerCamelCase				:		Dict     =   [int(item) for item in user_input.split(",")]
 print(F"""{cocktail_shaker_sort(unsorted) = }""")



