





from string import ascii_uppercase

def      __snake_case						(					_lowerCAmelCase : str				,				_lowerCAmelCase : str				,				_lowerCAmelCase : bool = False				,				_lowerCAmelCase : str = ascii_uppercase	) ->						str:
   A_					:				Union[str, Any]          =			keyword.upper()
   A_					:				int          =			plaintext.upper()
   A_					:				int          =			set(_lowerCAmelCase	)

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

   # create a shifted version of the alphabet
   A_					:				Optional[int]          =			unique_chars + [
       char for char in alphabet if char not in unique_chars
   ]

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

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

         # map current letter to letter in modified alphabet
         A_					:				List[Any]          =			row[column]
         letter_index += 1

   if verbose:
      print(_lowerCAmelCase	)
   # 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'''))







def      __snake_case						(					_lowerCAmelCase : float				,				_lowerCAmelCase : float				,				_lowerCAmelCase : int	) ->						float:
   A_					:				List[str]          =			[1 / first_term]
   A_					:				Tuple          =			1 / first_term
   for _ in range(number_of_terms - 1	):
      first_term += common_difference
      arithmetic_progression.append(_lowerCAmelCase	)
   A_					:				List[str]          =			[1 / step for step in arithmetic_progression]
   return sum(_lowerCAmelCase	)


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 print(sum_of_harmonic_progression(1 / 2, 2, 2))
