Create two numpy arrays and add the elements of both the arrays and store the result in sumArray.
Part 1
Write a Python program that does the following.
Part 2
Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source.
Provide the Python code and output for your program and all your examples.
Add methods to the classes and subclasses:
In the main code:
1. In K-means algorithm, what is the most commonly used distance metric to calculate distance between centroid of each cluster and data points?
a)Chebyshev distance
b)Manhattan
c)Euclidean
d)None of the above
1. Which of the following statement is not correct about k-means?
a)Accuracy of cluster are improved by scaling of attributes.
b)K-means clusters are affected by outliers.
c)K-Means clustering is NOT influenced by initial centroids which are called cluster seeds
d)Number of clusters to be built is typically an user input and it impacts the way clusters are created
1. The method / metric which is NOT useful to determine the optimal number of clusters in unsupervised clustering algorithms is
a)Dendogram
b)Elbow method
c) Scatter plot
d) None of the above
1. Each centroid in K- means algorithm defines one
a.cluster
b.data point
c.two clusters
d.None of the above
1. Match the terms in Group A with the relevant terms in Group B
Group A Group B
A.) k-means 1) unsupervised learning algorithm
B) knn 2) k is no. of clusters
c.) logistic regression 3) k is no. of neighbours
d). clustering 4) logit function
Create a mini quiz game program that asks the user three (3) questions,the starting score is 10 points.if the answer is incorrect 1 point is deducted from the score
Write a Python program that will ask the user to input a string (containing exactly one word). Then your program should print subsequent substrings of the given string as shown in the examples below.