



'''simple docstring'''



from __future__ import annotations

from collections.abc import Callable



def   _A       (   _lowerCAmelCase  ,   _lowerCAmelCase  ,   _lowerCAmelCase  ,   _lowerCAmelCase = 100  ,   ):



							"""simple docstring"""



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


if __name__ == "__main__":



		def   _A       (   _lowerCAmelCase					):



									"""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:""")
		lowerCamelCase	 =       10
		while i <= 10_0000:
				print(f"with {i} steps: {trapezoidal_area(f, -5, 5, i)}")
				i *= 10








'''simple docstring'''



def   _A       (   _lowerCAmelCase					):



							"""simple docstring"""



							if not isinstance(_lowerCAmelCase  ,   _lowerCAmelCase					):
														raise TypeError('only integers accepted as input'					)
							else:
														__lowercase       	=str(abs(_lowerCAmelCase					)					)
														__lowercase       	=[list(_lowerCAmelCase					) for char in range(len(_lowerCAmelCase					)					)]
														for index in range(len(_lowerCAmelCase					)					):
																					num_transpositions[index].pop(_lowerCAmelCase					)
														return max(
														    int(''.join(list(_lowerCAmelCase					)					)					) for transposition in num_transpositions					)


if __name__ == "__main__":
		__import__("""doctest""").testmod()



