Hi,
Completely new user for Python coding. Please help to understand the error.
please ignore the thread it was just a syntax error
distance += pow((instance1[x]-instance2[x],2))
Completely new user for Python coding. Please help to understand the error.
import math def euclideanDistance(instance1,instance2, length): distance = 0 for x in range(length): distance += pow((instance1[x]-instance2[x],2) return math.sqrt(distance)it displays the following error
Error:File "test6.py", line 9
return math.sqrt(distance)
^
SyntaxError: invalid syntax
please ignore the thread it was just a syntax error
distance += pow((instance1[x]-instance2[x],2))