





from __future__ import annotations

from collections.abc import Generator

def     UpperCAmelCase_						(						_UpperCAmelCase       :Tuple							)  ->							Dict:
     '''simple docstring'''


     if not isinstance(_UpperCAmelCase     ,	_UpperCAmelCase							) or n < 1:
          raise Exception('''Sequence only defined for positive integers'''							)

     yield n
     while n != 1:
          if n % 2 == 0:
               n //= 2
          else:
               A_					      =					3 * n + 1
          yield n

def     UpperCAmelCase_						(						)  ->							List[str]:
     '''simple docstring'''


     A_					      =					43
     A_					      =					tuple(collatz_sequence(_UpperCAmelCase							)							)
     print(_UpperCAmelCase							)
     print(f'Collatz sequence from {n} took {len(_UpperCAmelCase							)} steps.'							)


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
a__			:    List[str]			      =		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
a__      ,							a__      ,							a__      ,							a__			:    Any			      =		train_test_split(
    iris['data'], iris['target'], random_state=4
)

# KNN

a__			:    List[Any]			      =		KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

# new array to test
a__			:    Optional[Any]			      =		[[1, 2, 1, 4], [2, 3, 4, 5]]

a__			:    Union[str, Any]			      =		knn.predict(X_new)

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



