about | help | code help+videos | done | prefs |
distance
Calculate and return the Euclidean distance between the coordinates given as parameters. (Distance Formula) To calculate a square root use: math.sqrt(a) OR a**0.5 WARNING: Codingbat automatically imports math, normally you must import it yourself. distance(3, 0, 0, 4) → 5.0 distance(1, 0, 2, 0) → 1.0 distance(0, 0, 8, 15) → 17.0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 2
Copyright Nick Parlante 2017 - privacy