


"""simple docstring"""




def     lowercase			(SCREAMING_SNAKE_CASE_		:				list  )   ->						list:
						SCREAMING_SNAKE_CASE													=					len(SCREAMING_SNAKE_CASE_  )
						for _ in range(SCREAMING_SNAKE_CASE_  ):
												for i in range(_ % 2 ,			arr_size - 1 ,			2  ):
																		if arr[i + 1] < arr[i]:
																								SCREAMING_SNAKE_CASE							,				SCREAMING_SNAKE_CASE													=					arr[i + 1], arr[i]

						return arr


if __name__ == "__main__":
	__UpperCamelCase						=      list(range(10, 0, -1))
	print(f'''Original: {arr}. Sorted: {odd_even_transposition(arr)}''')






"""simple docstring"""




from __future__ import annotations

from collections.abc import Callable


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


if __name__ == "__main__":


	def     lowercase			(SCREAMING_SNAKE_CASE_		:				Optional[int]  )   ->						Dict:
							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


