




"""simple docstring"""

from typing import Literal

__A							=     "ABCDEFGHIJKLMNOPQRSTUVWXYZ"



def 					UpperCamelCase__       (						lowercase__					:       str    ,       lowercase__					:       str    ,       lowercase__					:       Literal["encrypt", "decrypt"]				):
		snake_case						:  int        =			LETTERS if mode == "decrypt" else key
		snake_case						:  List[Any]        =			key if mode == "decrypt" else LETTERS
		snake_case						:  List[Any]        =			""
		# loop through each symbol in the message
		for symbol in message:
				if symbol.upper() in chars_a:
						# encrypt/decrypt the symbol
						snake_case						:  Any        =			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__					:       str    ,       lowercase__					:       str				):
		return translate_message(lowercase__    ,       lowercase__    ,       "encrypt"				)



def 					UpperCamelCase__       (						lowercase__					:       str    ,       lowercase__					:       str				):
		return translate_message(lowercase__    ,       lowercase__    ,       "decrypt"				)



def 					UpperCamelCase__       (						):
		snake_case						:  Tuple        =			"Hello World"
		snake_case						:  Tuple        =			"QWERTYUIOPASDFGHJKLZXCVBNM"
		snake_case						:  Tuple        =			"decrypt"  # set to 'encrypt' or 'decrypt'

		if mode == "encrypt":
				snake_case						:  Union[str, Any]        =			encrypt_message(lowercase__    ,       lowercase__				)
		elif mode == "decrypt":
				snake_case						:  str        =			decrypt_message(lowercase__    ,       lowercase__				)
		print(F'''Using the key {key}, the {mode}ed message is: {translated}'''				)


if __name__ == "__main__":
							import doctest

							doctest.testmod()
							main()







"""simple docstring"""

def 					UpperCamelCase__       (						lowercase__					:       int				):
		if not isinstance(lowercase__    ,       lowercase__				):
				raise ValueError("double_factorial() only accepts integral values"				)
		if n < 0:
				raise ValueError("double_factorial() not defined for negative values"				)
		return 1 if n <= 1 else n * double_factorial(n - 2				)


if __name__ == "__main__":
							import doctest

							doctest.testmod()

