
"""simple docstring"""





UpperCamelCase_					:						int				= '''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(__a				,   __a				)
					elif mode.lower().startswith("d"				):
										A_				 =						"decrypt"
										A_				 =						decrypt_message(__a				,   __a				)

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

					'''simple docstring'''





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

					'''simple docstring'''





					return translate_message(__a				,   __a				,   "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(__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_				 =						0
										else:
															translated.append(__a				)
					return "".join(__a				)


if __name__ == "__main__":
		main()






"""simple docstring"""





from math import atan, cos, radians, sin, tan

from .haversine_distance import haversine_distance

UpperCamelCase_					:						Tuple				= 637_8137.0
UpperCamelCase_					:						List[str]				= 635_6752.31_4245
UpperCamelCase_					:						Dict				= 637_8137
def 							A_     (__a				,   __a				,   __a				,   __a				):

					'''simple docstring'''





					A_				 =						(AXIS_A - AXIS_B) / AXIS_A
					# Parametric latitudes
					# https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
					A_				 =						atan((1 - flattening) * tan(radians(__a				)				)				)
					A_				 =						atan((1 - flattening) * tan(radians(__a				)				)				)

					# Compute central angle between two points
					# using haversine theta. sigma =  haversine_distance / equatorial radius
					A_				 =						haversine_distance(__a				,   __a				,   __a				,   __a				) / EQUATORIAL_RADIUS

					# Intermediate P and Q values
					A_				 =						(b_lata + b_lata) / 2
					A_				 =						(b_lata - b_lata) / 2

					# Intermediate X value
					# X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
					A_				 =						(sin(__a				) ** 2) * (cos(__a				) ** 2)
					A_				 =						cos(sigma / 2				) ** 2
					A_				 =						(sigma - sin(__a				)) * (x_numerator / x_demonimator)

					# Intermediate Y value
					# Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
					A_				 =						(cos(__a				) ** 2) * (sin(__a				) ** 2)
					A_				 =						sin(sigma / 2				) ** 2
					A_				 =						(sigma + sin(__a				)) * (y_numerator / y_denominator)

					return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


if __name__ == "__main__":
		import doctest

		doctest.testmod()




