

from __future__ import annotations

def 							__SCREAMING_SNAKE_CASE							(				lowerCAmelCase:  list  ,      lowerCAmelCase:  int  ,      lowerCAmelCase:  int  ,      lowerCAmelCase:  int )   ->       list:
				_UpperCAmelCase       :		str 		=    []
				_UpperCAmelCase		,							_UpperCAmelCase       :		Any 		=    input_list[low:mid], input_list[mid : high + 1]
				while left and right:
								result.append((left if left[0] <= right[0] else right).pop(0 ) )
				_UpperCAmelCase       :		Any 		=    result + left + right
				return input_list

def 							__SCREAMING_SNAKE_CASE							(				lowerCAmelCase:  list )   ->       list:
				if len(lowerCAmelCase ) <= 1:
								return input_list
				_UpperCAmelCase       :		List[Any] 		=    list(lowerCAmelCase )

				# iteration for two-way merging
				_UpperCAmelCase       :		List[Any] 		=    2
				while p <= len(lowerCAmelCase ):
								# getting low, high and middle value for merge-sort of single list
								for i in range(0  ,      len(lowerCAmelCase )  ,      lowerCAmelCase ):
												_UpperCAmelCase       :		Union[str, Any] 		=    i
												_UpperCAmelCase       :		Optional[int] 		=    i + p - 1
												_UpperCAmelCase       :		Union[str, Any] 		=    (low + high + 1) // 2
												_UpperCAmelCase       :		Any 		=    merge(lowerCAmelCase  ,      lowerCAmelCase  ,      lowerCAmelCase  ,      lowerCAmelCase )
								# final merge of last two parts
								if p * 2 >= len(lowerCAmelCase ):
												_UpperCAmelCase       :		Tuple 		=    i
												_UpperCAmelCase       :		List[str] 		=    merge(lowerCAmelCase  ,      0  ,      lowerCAmelCase  ,      len(lowerCAmelCase ) - 1 )
												break
								p *= 2

				return input_list


if __name__ == "__main__":
					SCREAMING_SNAKE_CASE_        =      input('Enter numbers separated by a comma:\n').strip()
					if user_input == "":
										SCREAMING_SNAKE_CASE_        =      []
					else:
										SCREAMING_SNAKE_CASE_        =      [int(item.strip()) for item in user_input.split(',')]
					print(iter_merge_sort(unsorted))





from __future__ import annotations

from collections.abc import Callable

def 							__SCREAMING_SNAKE_CASE							(				lowerCAmelCase:  Callable[[int | float], int | float]  ,      lowerCAmelCase:  int | float  ,      lowerCAmelCase:  int | float  ,      lowerCAmelCase:  int = 100  ,      )   ->       float:
				_UpperCAmelCase       :		str 		=    x_start
				_UpperCAmelCase       :		Union[str, Any] 		=    fnc(lowerCAmelCase )
				_UpperCAmelCase       :		Tuple 		=    0.0
				for _ in range(lowerCAmelCase ):
								# Approximates small segments of curve as linear and solve
								# for trapezoidal area
								_UpperCAmelCase       :		Union[str, Any] 		=    (x_end - x_start) / steps + xa
								_UpperCAmelCase       :		Optional[Any] 		=    fnc(lowerCAmelCase )
								area += abs(fxa + fxa ) * (xa - xa) / 2
								# Increment step
								_UpperCAmelCase       :		Any 		=    xa
								_UpperCAmelCase       :		Optional[Any] 		=    fxa
				return area


if __name__ == "__main__":

					def 							__SCREAMING_SNAKE_CASE							(				lowerCAmelCase:  List[str] )   ->       List[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:')
					SCREAMING_SNAKE_CASE_        =      10
					while i <= 100000:
										print(F'''with {i} steps: {trapezoidal_area(f, -5, 5, i)}''')
										i *= 10


