


import enum
import shutil
import sys


__snake_case									=		shutil.get_terminal_size()

__snake_case									=		{"UP": "A", "DOWN": "B", "RIGHT": "C", "LEFT": "D"}



class      __lowerCamelCase       (enum.Enum		):
       _lowercase											=			0
       _lowercase											=			1






def 						_A						(						_lowercase ,   _lowercase=""      ) ->      Any:


     """simple docstring"""


     sys.stdout.write(str(UpperCamelCase__      ) + end      )
     sys.stdout.flush()






def 						_A						(						_lowercase ,   _lowercase ,   _lowercase=""      ) ->      Optional[int]:


     """simple docstring"""


     forceWrite(f'''\u001b[{color}m{content}\u001b[0m''' ,   UpperCamelCase__      )






def 						_A						(						) ->      List[str]:


     """simple docstring"""


     forceWrite('\r'      )






def 						_A						(						_lowercase ,   _lowercase      ) ->      int:


     """simple docstring"""


     forceWrite(f'''\033[{num_lines}{CURSOR_TO_CHAR[direction.upper()]}'''      )






def 						_A						(						) ->      Optional[int]:


     """simple docstring"""


     forceWrite(' ' * TERMINAL_WIDTH      )
     reset_cursor()






def 						_A						(						) ->      Dict:


     """simple docstring"""


     reset_cursor()
     forceWrite('-' * TERMINAL_WIDTH      )









from __future__ import annotations

from collections.abc import Callable





def 						__SCREAMING_SNAKE_CASE  (				UpperCamelCase__			,			UpperCamelCase__			,			UpperCamelCase__			,			UpperCamelCase__ = 100			,			)  ->				float:







			'''simple docstring'''

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


if __name__ == "__main__":





				def 						__SCREAMING_SNAKE_CASE  (				UpperCamelCase__ )  ->				str:







							'''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:")
				__A				:    List[Any]       =   10
				while i <= 100_000:
								print(F'with {i} steps: {trapezoidal_area(f, -5, 5, i)}')
								i *= 10



