k-Means Clustering is the Partitioning-based clustering method and is the most popular and widely used method of Cluster Analysis. The…