Exercise: Darts, some problem on testing

In the exercise tests, I think there are some mistakes unless I misunderstood the track. If the dart takes the central arc of radius one is 10 points, this means that if the coordinates X, Y are between -1 and 1 then I have to return 10, however a test wants that with the coordinates -0.8, -0.8 I return 5 which is the score of the next area, same with other tests that present these approximations

The point (0.8, 0.8) is more than 1 units away from (0, 0). You need to leverage the Pythagorean Theorem to calculate the distance.

2 Likes

Thanks a lot, I hadn’t thought about it