The K-Nearest Neighbors algorithm is a straightforward classification algorithm used for both classification. It operates on the principle of proximity between data points. To determine a new data point, the KNN algorithm locates its neighbors within a distance k in the training dataset. The label of the new data point is then assigned based on the