I tried this
import math
from math import sqrt
def euclideanDistance(xtr, ytr, Ltr):
distance = 0
for x in range(Ltr):
distance += pow((xtr[x] - ytr[x]), 2)
return sqrt(distance)
But it returned me the following error:
File "<stdin>", line 5
return sqrt(distance)
^
SyntaxError: invalid syntax
What is the cause of this syntax error?