forked from tdwojak/Python2017
task05 passed
This commit is contained in:
parent
841880258b
commit
d790e85a09
@ -8,9 +8,11 @@ dwoma punktami przestrzeni trójwymiarowej. Punkty są dane jako
|
|||||||
trzyelementowe listy liczb zmiennoprzecinkowych.
|
trzyelementowe listy liczb zmiennoprzecinkowych.
|
||||||
np. odległość pomiędzy punktami (0, 0, 0) i (3, 4, 0) jest równa 5.
|
np. odległość pomiędzy punktami (0, 0, 0) i (3, 4, 0) jest równa 5.
|
||||||
"""
|
"""
|
||||||
|
import math
|
||||||
|
|
||||||
def euclidean_distance(x, y):
|
def euclidean_distance(x, y):
|
||||||
pass
|
return(math.sqrt((x[0] - y[0])**2) + math.sqrt((x[1]-y[1])**2))
|
||||||
|
|
||||||
|
|
||||||
def tests(f):
|
def tests(f):
|
||||||
inputs = [[(2.3, 4.3, -7.5), (2.3, 8.5, -7.5)]]
|
inputs = [[(2.3, 4.3, -7.5), (2.3, 8.5, -7.5)]]
|
||||||
|
Loading…
Reference in New Issue
Block a user