




def    A						(__A   :    list   ,				__A   :    list       )   ->      float:







     """simple docstring"""


     _validate_point(__A       )
     _validate_point(__A       )
     if len(__A       ) != len(__A       ):
          raise ValueError('''Both points must be in the same n-dimensional space'''       )

     return float(sum(abs(a - b       ) for a, b in zip(__A   ,				__A       )       )       )


def    A						(__A   :    list[float]       )   ->      None:







     """simple docstring"""


     if point:
          if isinstance(__A   ,				__A       ):
               for item in point:
                    if not isinstance(__A   ,				(int, float)       ):
                         UpperCAmelCase_          =							(
                             '''Expected a list of numbers as input, found '''
                             F"""{type(__A       ).__name__}"""
                         )
                         raise TypeError(__A       )
          else:
               UpperCAmelCase_          =							F"""Expected a list of numbers as input, found {type(__A       ).__name__}"""
               raise TypeError(__A       )
     else:
          raise ValueError('''Missing an input'''       )


def    A						(__A   :    list   ,				__A   :    list       )   ->      float:







     """simple docstring"""


     _validate_point(__A       )
     _validate_point(__A       )
     if len(__A       ) != len(__A       ):
          raise ValueError('''Both points must be in the same n-dimensional space'''       )

     return float(sum(abs(x - y       ) for x, y in zip(__A   ,				__A       )       )       )


if __name__ == "__main__":
    import doctest

    doctest.testmod()










"""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


