Yes! it actually works for the
print(clusterAnalysis(np.array([1.7, 1.6, 1.3, 1.3, 2.8, 1.4,2.8, 2.6, 1.6, 2.7])))However, if I put it into the checking software( the one that check the assigments) and the software uses list of 11 figures in the array( instead of 10 like I mentioned orginally), then isnt the line in code:
if (reflectance[i]*10)%2 ==0: #reading upto first decimal value and checking for even number, but this goes wrong like if given 3.0, it thinks as even while it is actually odd.evenarray.append(reflectance[i])wrong?