
from __future__ import annotations

from collections.abc import Callable




def 		lowerCAmelCase_     (     _SCREAMING_SNAKE_CASE      ,	_SCREAMING_SNAKE_CASE      ,	_SCREAMING_SNAKE_CASE      ,	_SCREAMING_SNAKE_CASE = 1_0_0      ,	)   ->      float:

							"""simple docstring"""






							_UpperCAmelCase  :			str	       =		x_start
							_UpperCAmelCase  :			Optional[Any]	       =		fnc(_SCREAMING_SNAKE_CASE  )
							_UpperCAmelCase  :			Optional[int]	       =		0.0

							for _ in range(_SCREAMING_SNAKE_CASE  ):
														# Approximates small segments of curve as linear and solve
														# for trapezoidal area
														_UpperCAmelCase  :			int	       =		(x_end - x_start) / steps + xa
														_UpperCAmelCase  :			Any	       =		fnc(_SCREAMING_SNAKE_CASE  )
														area += abs(fxa + fxa  ) * (xa - xa) / 2

														# Increment step
														_UpperCAmelCase  :			Optional[int]	       =		xa
														_UpperCAmelCase  :			Dict	       =		fxa
							return area


if __name__ == "__main__":




				def 		lowerCAmelCase_     (     _SCREAMING_SNAKE_CASE  )   ->      Union[str, Any]:

											"""simple docstring"""






											return x**3

				print('f(x) = x^3')
				print('The area between the curve, x = -10, x = 10 and the x axis is:')
				__lowerCamelCase								=					1_0
				while i <= 1_0_0_0_0_0:
								__lowerCamelCase								=					trapezoidal_area(f, -5, 5, i)
								print(f'''with {i} steps: {area}''')
								i *= 1_0






def 		lowerCAmelCase_     (     _SCREAMING_SNAKE_CASE      ,	_SCREAMING_SNAKE_CASE      ,	_SCREAMING_SNAKE_CASE  )   ->      Dict:

							"""simple docstring"""






							if power < 0:
														return -1
							base %= mod
							_UpperCAmelCase  :			Optional[Any]	       =		1

							while power > 0:
														if power & 1:
																					_UpperCAmelCase  :			Optional[Any]	       =		(result * base) % mod
														_UpperCAmelCase  :			List[str]	       =		power >> 1
														_UpperCAmelCase  :			Optional[int]	       =		(base * base) % mod

							return result




def 		lowerCAmelCase_     (     )   ->      List[str]:

							"""simple docstring"""






							print(modular_exponential(3      ,	2_0_0      ,	1_3  )  )


if __name__ == "__main__":
				import doctest

				doctest.testmod()

				main()




