forked from tdwojak/Python2017
update test task
Signed-off-by: s45167 <krzysztof.spalinski@op.pl>
This commit is contained in:
parent
a4c07e0d39
commit
50ec721ed5
@ -10,6 +10,10 @@ np. odległość pomiędzy punktami (0, 0, 0) i (3, 4, 0) jest równa 5.
|
||||
"""
|
||||
|
||||
def euclidean_distance(x, y):
|
||||
if len(x) != len(y):
|
||||
return 0
|
||||
else:
|
||||
return ((x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2) ** (1 / 2)
|
||||
pass
|
||||
|
||||
def tests(f):
|
||||
|
Loading…
Reference in New Issue
Block a user