



lowercase_						=       """ABCDEFGHIJKLMNOPQRSTUVWXYZ"""



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

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

			print(f'''\n{mode.title()}ed message:'''					)
			print(lowercase__					)



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_					):
			return translate_message(lowercase__  ,					lowercase__  ,					"encrypt"					)



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_					):
			return translate_message(lowercase__  ,					lowercase__  ,					"decrypt"					)



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_					):
			lowercase__   					=			[]
			lowercase__   					=			0
			lowercase__   					=			key.upper()

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

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

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


if __name__ == "__main__":
							main()









from math import sqrt

import numpy as np
from sympy import symbols

# Coefficient
# Speed of light (m/s)
lowercase_						=       2_9979_2458

# Symbols
lowercase_			,      lowercase_			,      lowercase_			,      lowercase_						=       symbols("""ct x y z""")



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			if velocity > c:
						raise ValueError("Speed must not exceed light speed 299,792,458 [m/s]!"					)
			elif velocity < 1:
						# Usually the speed should be much higher than 1 (c order of magnitude)
						raise ValueError("Speed must be greater than or equal to 1!"					)

			return velocity / c



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			return 1 / sqrt(1 - beta(SCREAMING_SNAKE_CASE_					) ** 2					)



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			return np.array(
			    [
			        [gamma(SCREAMING_SNAKE_CASE_					), -gamma(SCREAMING_SNAKE_CASE_					) * beta(SCREAMING_SNAKE_CASE_					), 0, 0],
			        [-gamma(SCREAMING_SNAKE_CASE_					) * beta(SCREAMING_SNAKE_CASE_					), gamma(SCREAMING_SNAKE_CASE_					), 0, 0],
			        [0, 0, 1, 0],
			        [0, 0, 0, 1],
			    ]					)



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_  ,					SCREAMING_SNAKE_CASE_ = None					):
			# Ensure event is not empty
			if event is None:
						lowercase__   					=			np.array([ct, x, y, z]					)  # Symbolic four vector
			else:
						event[0] *= c  # x0 is ct (speed of light * time)

			return transformation_matrix(SCREAMING_SNAKE_CASE_					) @ event


if __name__ == "__main__":
							import doctest

							doctest.testmod()

							# Example of symbolic vector:
							lowercase_						=       transform(2997_9245)
							print("""Example of four vector: """)
							print(F'ct\' = {four_vector[0]}')
							print(F'x\' = {four_vector[1]}')
							print(F'y\' = {four_vector[2]}')
							print(F'z\' = {four_vector[3]}')

							# Substitute symbols with numerical values
							lowercase_						=       {ct: c, x: 1, y: 1, z: 1}
							lowercase_						=       [four_vector[i].subs(sub_dict) for i in range(4)]

							print(F'\n{numerical_vector}')




