



'''simple docstring'''






lowerCAmelCase:      Tuple		 =		'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
def    lowerCamelCase__ (		):
  a		:      str       =  input('Enter message: '       )
  a		:      Dict       =  input('Enter key [alphanumeric]: '       )
  a		:      Optional[int]       =  input('Encrypt/Decrypt [e/d]: '       )

  if mode.lower().startswith('e'       ):
    a		:      Optional[int]       =  'encrypt'
    a		:      Tuple       =  encrypt_message(_A				,    _A       )
  elif mode.lower().startswith('d'       ):
    a		:      List[Any]       =  'decrypt'
    a		:      int       =  decrypt_message(_A				,    _A       )

  print(f"""\n{mode.title()}ed message:"""       )
  print(_A       )
def    lowerCamelCase__ (		_A				,    _A       ):
  return translate_message(_A				,    _A				,    'encrypt'       )
def    lowerCamelCase__ (		_A				,    _A       ):
  return translate_message(_A				,    _A				,    'decrypt'       )
def    lowerCamelCase__ (		_A				,    _A				,    _A       ):
  a		:      int       =  []
  a		:      Any       =  0
  a		:      Optional[int]       =  key.upper()

  for symbol in message:
    a		:      Union[str, Any]       =  LETTERS.find(symbol.upper()       )
    if num != -1:
      if mode == "encrypt":
        num += LETTERS.find(key[key_index]       )
      elif mode == "decrypt":
        num -= LETTERS.find(key[key_index]       )

      num %= len(_A       )

      if symbol.isupper():
        translated.append(LETTERS[num]       )
      elif symbol.islower():
        translated.append(LETTERS[num].lower()       )

      key_index += 1
      if key_index == len(_A       ):
        a		:      Any       =  0
    else:
      translated.append(_A       )
  return "".join(_A       )


if __name__ == "__main__":
     main()




'''simple docstring'''






from math import factorial, pi
def    lowerCamelCase__ (		_A				,    _A = 30       ):

  if not isinstance(_A				,    (int, float)       ):
    raise ValueError('maclaurin_sin() requires either an int or float for theta'       )

  if not isinstance(_A				,    _A       ) or accuracy <= 0:
    raise ValueError('maclaurin_sin() requires a positive int for accuracy'       )

  a		:      List[Any]       =  float(_A       )
  a		:      Optional[int]       =  theta // (2 * pi)
  theta -= 2 * div * pi
  return sum(
      (-1) ** r * theta ** (2 * r + 1) / factorial(2 * r + 1       ) for r in range(_A       )       )
def    lowerCamelCase__ (		_A				,    _A = 30       ):

  if not isinstance(_A				,    (int, float)       ):
    raise ValueError('maclaurin_cos() requires either an int or float for theta'       )

  if not isinstance(_A				,    _A       ) or accuracy <= 0:
    raise ValueError('maclaurin_cos() requires a positive int for accuracy'       )

  a		:      List[str]       =  float(_A       )
  a		:      List[str]       =  theta // (2 * pi)
  theta -= 2 * div * pi
  return sum((-1) ** r * theta ** (2 * r) / factorial(2 * r       ) for r in range(_A       )       )


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     print(maclaurin_sin(1_0))
     print(maclaurin_sin(-1_0))
     print(maclaurin_sin(1_0, 1_5))
     print(maclaurin_sin(-1_0, 1_5))

     print(maclaurin_cos(5))
     print(maclaurin_cos(-5))
     print(maclaurin_cos(1_0, 1_5))
     print(maclaurin_cos(-1_0, 1_5))