



from typing import Literal

UpperCamelCase_      			=  "ABCDEFGHIJKLMNOPQRSTUVWXYZ"







def 							A     (						__UpperCAmelCase				,   __UpperCAmelCase				,   __UpperCAmelCase      )			->			Union[str, Any]:



						'''simple docstring'''






						UpperCAmelCase_					=	LETTERS if mode == '''decrypt''' else key
						UpperCAmelCase_					=	key if mode == '''decrypt''' else LETTERS
						UpperCAmelCase_					=	''''''
						# loop through each symbol in the message
						for symbol in message:
												if symbol.upper() in chars_a:
																		# encrypt/decrypt the symbol
																		UpperCAmelCase_					=	chars_a.find(symbol.upper()      )
																		if symbol.isupper():
																								translated += chars_b[sym_index].upper()
																		else:
																								translated += chars_b[sym_index].lower()
												else:
																		# symbol is not in LETTERS, just add it
																		translated += symbol
						return translated







def 							A     (						__UpperCAmelCase				,   __UpperCAmelCase      )			->			str:



						'''simple docstring'''






						return translate_message(_lowercase				,   _lowercase				,   '''encrypt'''      )







def 							A     (						__UpperCAmelCase				,   __UpperCAmelCase      )			->			str:



						'''simple docstring'''






						return translate_message(_lowercase				,   _lowercase				,   '''decrypt'''      )







def 							A     (						)			->			str:



						'''simple docstring'''






						UpperCAmelCase_					=	'''Hello World'''
						UpperCAmelCase_					=	'''QWERTYUIOPASDFGHJKLZXCVBNM'''
						UpperCAmelCase_					=	'''decrypt'''  # set to 'encrypt' or 'decrypt'

						if mode == "encrypt":
												UpperCAmelCase_					=	encrypt_message(_lowercase				,   _lowercase      )
						elif mode == "decrypt":
												UpperCAmelCase_					=	decrypt_message(_lowercase				,   _lowercase      )
						print(f"Using the key {key}, the {mode}ed message is: {translated}"      )


if __name__ == "__main__":
							import doctest

							doctest.testmod()
							main()













from typing import Literal

lowerCamelCase					    =	'''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''
def 							UpperCAmelCase   ( _lowercase,   _lowercase,   _lowercase   ):


    '''simple docstring'''



    _lowercase     			=						LETTERS if mode == 'decrypt' else key
    _lowercase     			=						key if mode == 'decrypt' else LETTERS
    _lowercase     			=						''
    # loop through each symbol in the message
    for symbol in message:
        if symbol.upper() in chars_a:
            # encrypt/decrypt the symbol
            _lowercase     			=						chars_a.find(symbol.upper()   )
            if symbol.isupper():
                translated += chars_b[sym_index].upper()
            else:
                translated += chars_b[sym_index].lower()
        else:
            # symbol is not in LETTERS, just add it
            translated += symbol
    return translated
def 							UpperCAmelCase   ( _lowercase,   _lowercase   ):


    '''simple docstring'''



    return translate_message(_lowercase,   _lowercase,   'encrypt'   )
def 							UpperCAmelCase   ( _lowercase,   _lowercase   ):


    '''simple docstring'''



    return translate_message(_lowercase,   _lowercase,   'decrypt'   )
def 							UpperCAmelCase   ( ):


    '''simple docstring'''



    _lowercase     			=						'Hello World'
    _lowercase     			=						'QWERTYUIOPASDFGHJKLZXCVBNM'
    _lowercase     			=						'decrypt'  # set to 'encrypt' or 'decrypt'

    if mode == "encrypt":
        _lowercase     			=						encrypt_message(_lowercase,   _lowercase   )
    elif mode == "decrypt":
        _lowercase     			=						decrypt_message(_lowercase,   _lowercase   )
    print(f'''Using the key {key}, the {mode}ed message is: {translated}'''   )


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   main()
