| about | help | code help+videos | done | prefs |
A point can be represented as an x and y coordinate. The parameters to the distance method include two points so the parameters are x1, y1, x2, y2 where the first two parameters are the coordinates of the first point and the second two parameters the coordinates of the second point. Complete the distance method so it returns the distance between the two points.distance(1, 1, 5, 1) → 4.0 distance(1, 1, 1, 5) → 4.0 distance(-3, 0, 2, -3) → 5.830951894845301 ...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: 200 Post-solution available
Copyright Nick Parlante 2017 - privacy