about | help | code help+videos | done | prefs |
perimeter
Define a function that when passed two integers representing the x and y intercepts of a line, returns the perimeter of the triangle formed by those two points and the origin (0, 0).
perimeter(3, 4) → 12.0 perimeter(8, -6) → 24.0 perimeter(-10, 10) → 34.14213562373095 ...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: 4 Post-solution available
Copyright Nick Parlante 2017 - privacy