

import random
import sys

snake_case__     							= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
def  __SCREAMING_SNAKE_CASE       (				)       ->  None:
						__magic_name__				:							Dict				=      input('Enter message: '				)
						__magic_name__				:							Tuple				=      'LFWOAYUISVKMNXPBDCRJTQEGHZ'
						__magic_name__				:							Union[str, Any]				=      input('Encrypt/Decrypt [e/d]: '				)

						check_valid_key(lowercase__				)

						if resp.lower().startswith('e'				):
												__magic_name__				:							Dict				=      'encrypt'
												__magic_name__				:							str				=      encrypt_message(lowercase__      ,						lowercase__				)
						elif resp.lower().startswith('d'				):
												__magic_name__				:							Optional[Any]				=      'decrypt'
												__magic_name__				:							List[Any]				=      decrypt_message(lowercase__      ,						lowercase__				)

						print(f"\n{mode.title()}ion: \n{translated}"				)
def  __SCREAMING_SNAKE_CASE       (				lowercase__  :str				)       ->  None:
						__magic_name__				:							str				=      list(lowercase__				)
						__magic_name__				:							str				=      list(lowercase__				)
						key_list.sort()
						letters_list.sort()

						if key_list != letters_list:
												sys.exit('Error in the key or symbol set.'				)
def  __SCREAMING_SNAKE_CASE       (				lowercase__  :str      ,						lowercase__  :str				)       ->  str:
						return translate_message(lowercase__      ,						lowercase__      ,						'encrypt'				)
def  __SCREAMING_SNAKE_CASE       (				lowercase__  :str      ,						lowercase__  :str				)       ->  str:
						return translate_message(lowercase__      ,						lowercase__      ,						'decrypt'				)
def  __SCREAMING_SNAKE_CASE       (				lowercase__  :str      ,						lowercase__  :str      ,						lowercase__  :str				)       ->  str:
						__magic_name__				:							Any				=      ''
						__magic_name__				:							List[Any]				=      LETTERS
						__magic_name__				:							Optional[Any]				=      key

						if mode == "decrypt":
												__magic_name__				:							List[str]				=      chars_b, chars_a

						for symbol in message:
												if symbol.upper() in chars_a:
																		__magic_name__				:							List[Any]				=      chars_a.find(symbol.upper()				)
																		if symbol.isupper():
																								translated += chars_b[sym_index].upper()
																		else:
																								translated += chars_b[sym_index].lower()
												else:
																		translated += symbol

						return translated
def  __SCREAMING_SNAKE_CASE       (				)       ->  str:
						__magic_name__				:							List[Any]				=      list(lowercase__				)
						random.shuffle(lowercase__				)
						return "".join(lowercase__				)


if __name__ == "__main__":
			main()






from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier

# Load iris file
snake_case__     							= load_iris()
iris.keys()


print(F"""Target names: \n {iris.target_names} """)
print(F"""\n Features: \n {iris.feature_names}""")

# Train set e Test set
snake_case__							,     snake_case__							,     snake_case__							,     snake_case__     							= train_test_split(
    iris['data'], iris['target'], random_state=4
)

# KNN

snake_case__     							= KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

# new array to test
snake_case__     							= [[1, 2, 1, 4], [2, 3, 4, 5]]

snake_case__     							= knn.predict(X_new)

print(
    F"""\nNew array: \n {X_new}\n\nTarget Names Prediction: \n"""
    F""" {iris['target_names'][prediction]}"""
)


