1
0
forked from tdwojak/Python2017

commited tasks

This commit is contained in:
s45150 2017-11-26 22:47:10 +01:00
parent 4576474620
commit 464d765a82

View File

@ -11,8 +11,9 @@ np. odległość pomiędzy punktami (0, 0, 0) i (3, 4, 0) jest równa 5.
def euclidean_distance(x, y):
dist = 0
for a,b in x,y:
dist = (sum(a-b)**2)**0.5
for i in range(len(x)):
dist += (x[i]-y[i])**2
dist = dist**0.5
return dist
def tests(f):