


def 						_A						(						_lowercase      ) ->      str:


     """simple docstring"""


     __UpperCamelCase      =       0

     # if input_string is "aba" than new_input_string become "a|b|a"
     __UpperCamelCase      =       ''
     __UpperCamelCase      =       ''

     # append each character + "|" in new_string for range(0, length-1)
     for i in input_string[: len(UpperCamelCase__      ) - 1]:
          new_input_string += i + "|"
     # append last character
     new_input_string += input_string[-1]

     # we will store the starting and ending of previous furthest ending palindromic
     # substring
     __UpperCamelCase,  __UpperCamelCase      =       0, 0

     # length[i] shows the length of palindromic substring with center i
     __UpperCamelCase      =       [1 for i in range(len(UpperCamelCase__      )      )]

     # for each character in new_string find corresponding palindromic string
     __UpperCamelCase      =       0
     for j in range(len(UpperCamelCase__      )      ):
          __UpperCamelCase      =       1 if j > r else min(length[l + r - j] // 2 ,   r - j + 1      )
          while (
              j - k >= 0
              and j + k < len(UpperCamelCase__      )
              and new_input_string[k + j] == new_input_string[j - k]
          ):
               k += 1

          __UpperCamelCase      =       2 * k - 1

          # does this string is ending after the previously explored end (that is r) ?
          # if yes the update the new r to the last index of this
          if j + k - 1 > r:
               __UpperCamelCase      =       j - k + 1  # noqa: E741
               __UpperCamelCase      =       j + k - 1

          # update max_length and start position
          if max_length < length[j]:
               __UpperCamelCase      =       length[j]
               __UpperCamelCase      =       j

    # create that string
     __UpperCamelCase      =       new_input_string[start - max_length // 2 : start + max_length // 2 + 1]
     for i in s:
          if i != "|":
               output_string += i

     return output_string


if __name__ == "__main__":
    import doctest

    doctest.testmod()









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



