
"""simple docstring"""





UpperCamelCase_       :    List[str]						      =			'''ABCDEFGHIJKLMNOPQRSTUVWXYZ'''
def 				A_  ():

					'''simple docstring'''





					A_								=    input("Enter message: "					)
					A_								=    input("Enter key [alphanumeric]: "					)
					A_								=    input("Encrypt/Decrypt [e/d]: "					)

					if mode.lower().startswith("e"					):
										A_								=    "encrypt"
										A_								=    encrypt_message(UpperCAmelCase__					, UpperCAmelCase__					)
					elif mode.lower().startswith("d"					):
										A_								=    "decrypt"
										A_								=    decrypt_message(UpperCAmelCase__					, UpperCAmelCase__					)

					print(f'\n{mode.title()}ed message:'					)
					print(UpperCAmelCase__					)
def 				A_  (__a					, __a					):

					'''simple docstring'''





					return translate_message(UpperCAmelCase__					, UpperCAmelCase__					, "encrypt"					)
def 				A_  (__a					, __a					):

					'''simple docstring'''





					return translate_message(UpperCAmelCase__					, UpperCAmelCase__					, "decrypt"					)
def 				A_  (__a					, __a					, __a					):

					'''simple docstring'''





					A_								=    []
					A_								=    0
					A_								=    key.upper()

					for symbol in message:
										A_								=    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(UpperCAmelCase__					)

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

															key_index += 1
															if key_index == len(UpperCAmelCase__					):
																				A_								=    0
										else:
															translated.append(UpperCAmelCase__					)
					return "".join(UpperCAmelCase__					)


if __name__ == "__main__":
		main()






lowercase   =	8.314_4598



def   __lowerCAmelCase    (				UpperCAmelCase__					:   float      ,					UpperCAmelCase__					:   float							)	->     float:
							if temperature < 0:
														raise Exception("""Temperature cannot be less than 0 K"""							)
							if molar_mass <= 0:
														raise Exception("""Molar mass cannot be less than or equal to 0 kg/mol"""							)
							else:
														return (3 * UNIVERSAL_GAS_CONSTANT * temperature / molar_mass) ** 0.5


if __name__ == "__main__":
		import doctest

		# run doctest
		doctest.testmod()

		# example
		lowercase   =	3_0_0
		lowercase   =	2_8
		lowercase   =	rms_speed_of_molecule(temperature, molar_mass)
		print(F"""Vrms of Nitrogen gas at 300 K is {vrms} m/s""")





