
'''simple docstring'''
from __future__ import annotations

from collections.abc import Callable

def 				UpperCamelCase_       (		__SCREAMING_SNAKE_CASE,						__SCREAMING_SNAKE_CASE,						__SCREAMING_SNAKE_CASE,						__SCREAMING_SNAKE_CASE = 1_0_0,						):
    """simple docstring"""






    snake_case_	:      Optional[Any]            =  x_start
    snake_case_	:      str            =  fnc(__SCREAMING_SNAKE_CASE    )
    snake_case_	:      List[str]            =  0.0

    for _ in range(__SCREAMING_SNAKE_CASE    ):
        # Approximates small segments of curve as linear and solve
        # for trapezoidal area
        snake_case_	:      List[str]            =  (x_end - x_start) / steps + xa
        snake_case_	:      Optional[int]            =  fnc(__SCREAMING_SNAKE_CASE    )
        area += abs(fxa + fxa    ) * (xa - xa) / 2

        # Increment step
        snake_case_	:      List[Any]            =  xa
        snake_case_	:      Optional[Any]            =  fxa
    return area


if __name__ == "__main__":

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






'''simple docstring'''
from __future__ import annotations

from typing import Any






class 				UpperCAmelCase_			:





 def __init__(      self	,    lowercase_	,    lowercase_):  # noqa: A002
     snake_case_	:      List[str]            =  item
     snake_case_	:      Dict            =  next






class 				UpperCAmelCase_			:





 def __init__(      self):
     snake_case_	:      Node | None            =  None
     snake_case_	:      List[str]            =  0





 def     snake_case__						(      self	,    lowercase_):
     snake_case_	:      List[Any]            =  Node(lowercase_	,    self.head)
     self.size += 1





 def     snake_case__						(      self):
     # Switched 'self.is_empty()' to 'self.head is None'
     # because mypy was considering the possibility that 'self.head'
     # can be None in below else part and giving error
     if self.head is None:
         return None
     else:
         snake_case_	:      List[Any]            =  self.head.item
         snake_case_	:      Any            =  self.head.next
         self.size -= 1
         return item





 def     snake_case__						(      self):
     return self.head is None





 def __str__(      self):
     if self.is_empty():
         return ""
     else:
         snake_case_	:      Dict            =  self.head
         snake_case_	:      Optional[Any]            =  ""
         snake_case_	:      list[str]            =  []
         while iterate:
             item_list.append(str(iterate.item))
             snake_case_	:      List[str]            =  iterate.next

         snake_case_	:      Optional[Any]            =  " --> ".join(lowercase_)

         return item_str





 def __len__(      self):
     return self.size




