forked from tdwojak/Python2017
Update 'labs02/task05.py'
This commit is contained in:
parent
f43122f338
commit
cb3142f748
@ -9,9 +9,11 @@ trzyelementowe listy liczb zmiennoprzecinkowych.
|
||||
np. odległość pomiędzy punktami (0, 0, 0) i (3, 4, 0) jest równa 5.
|
||||
"""
|
||||
|
||||
import math
|
||||
def euclidean_distance(x, y):
|
||||
pass
|
||||
|
||||
z=math.sqrt((sum((x-y)**2 for x,y in zip(x,y))))
|
||||
return z
|
||||
|
||||
def tests(f):
|
||||
inputs = [[(2.3, 4.3, -7.5), (2.3, 8.5, -7.5)]]
|
||||
outputs = [4.2]
|
||||
|
Loading…
Reference in New Issue
Block a user