
"""simple docstring"""

from __future__ import annotations

from collections.abc import Callable
def 		UpperCAmelCase					(		a_,						a_,						a_,						a_ = 100,						):





		'''simple docstring'''


		lowerCamelCase     :			List[str]		=    x_start
		lowerCamelCase     :			Union[str, Any]		=    fnc(a_			)
		lowerCamelCase     :			Tuple		=    0.0

		for _ in range(a_			):
				# Approximates small segments of curve as linear and solve
				# for trapezoidal area
				lowerCamelCase     :			List[Any]		=    (x_end - x_start) / steps + xa
				lowerCamelCase     :			Any		=    fnc(a_			)
				area += abs(fxa + fxa			) * (xa - xa) / 2

				# Increment step
				lowerCamelCase     :			Any		=    xa
				lowerCamelCase     :			Union[str, Any]		=    fxa
		return area


if __name__ == "__main__":
					def 		UpperCAmelCase					(		a_			):





							'''simple docstring'''


							return x**3

					print('f(x) = x^3')
					print('The area between the curve, x = -10, x = 10 and the x axis is:')
					_A            = 1_0
					while i <= 1_0_0_0_0_0:
										_A            = trapezoidal_area(f, -5, 5, i)
										print(F"""with {i} steps: {area}""")
										i *= 1_0













"""simple docstring"""


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

# KNN

A_     :      str								=KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

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

A_     :      int								=knn.predict(X_new)

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






