about | help | code help+videos | done | prefs |
This method deals with a single target and a single shot at that target. The coordinates of both the target and the location where the shot hits are given in 3-dimensional space. Write a method that returns 'true' if the distance between the target and the shot is less than 'range' and 'false' if the shot is out of range. Look at the test data for examples. test2022_01_20_HL_hit([100, 500, 200], [120, 490, 200], 22) → false test2022_01_20_HL_hit([100, 500, 200], [120, 490, 200], 23) → true test2022_01_20_HL_hit([100, 500, 200], [120, 490, 200], 22.4) → true ...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: 290
Copyright Nick Parlante 2017 - privacy