

'''simple docstring'''



from string import ascii_uppercase







def      a__ (						a__   ,					a__   ,					a__ = False   ,					a__ = ascii_uppercase		):




     """simple docstring"""


     __SCREAMING_SNAKE_CASE						     =   keyword.upper()
     __SCREAMING_SNAKE_CASE						     =   plaintext.upper()
     __SCREAMING_SNAKE_CASE						     =   set(a__		)

     # create a list of unique characters in the keyword - their order matters
     # it determines how we will map plaintext characters to the ciphertext
     __SCREAMING_SNAKE_CASE						     =   []
     for char in keyword:
          if char in alphabet_set and char not in unique_chars:
               unique_chars.append(a__		)
    # the number of those unique characters will determine the number of rows
     __SCREAMING_SNAKE_CASE						     =   len(a__		)

     # create a shifted version of the alphabet
     __SCREAMING_SNAKE_CASE						     =   unique_chars + [
         char for char in alphabet if char not in unique_chars
     ]

     # create a modified alphabet by splitting the shifted alphabet into rows
     __SCREAMING_SNAKE_CASE						     =   [
         shifted_alphabet[k : k + num_unique_chars_in_keyword]
         for k in range(0   ,					26   ,					a__		)
     ]

     # map the alphabet characters to the modified alphabet characters
     # going 'vertically' through the modified alphabet - consider columns first
     __SCREAMING_SNAKE_CASE						     =   {}
     __SCREAMING_SNAKE_CASE						     =   0
     for column in range(a__		):
          for row in modified_alphabet:
               # if current row (the last one) is too short, break out of loop
               if len(a__		) <= column:
                    break

               # map current letter to letter in modified alphabet
               __SCREAMING_SNAKE_CASE						     =   row[column]
               letter_index += 1

     if verbose:
          print(a__		)
     # create the encrypted text by mapping the plaintext to the modified alphabet
     return "".join(mapping[char] if char in mapping else char for char in plaintext		)


if __name__ == "__main__":
  # example use
  print(mixed_keyword('college', 'UNIVERSITY'))









'''simple docstring'''



from __future__ import annotations

from collections.abc import Callable







def      a__ (						a__   ,					a__   ,					a__   ,					a__ = 1_00   ,					):




     """simple docstring"""


     __SCREAMING_SNAKE_CASE						     =   x_start
     __SCREAMING_SNAKE_CASE						     =   fnc(a__		)
     __SCREAMING_SNAKE_CASE						     =   0.0

     for _ in range(a__		):
          # 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(a__		)
          area += abs(fxa + fxa		) * (xa - xa) / 2

          # Increment step
          __SCREAMING_SNAKE_CASE						     =   xa
          __SCREAMING_SNAKE_CASE						     =   fxa
     return area


if __name__ == "__main__":







  def      a__ (						a__		):




       """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:')
  UpperCAmelCase				: Optional[Any]         =  1_0
  while i <= 1_0_0_0_0_0:
    UpperCAmelCase				: Union[str, Any]         =  trapezoidal_area(f, -5, 5, i)
    print(f"""with {i} steps: {area}""")
    i *= 1_0






