-
-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Darts - is there an inconsistency between the tests and the overview page description? #839
Comments
The very first test is inconsistent with the second test.
while the second test is defined as: Some basic Git commands are:
Shouldn't the expected values be 1 and 1 respectively? |
The distance from origin to
Since the distance from origin is greater than 5, it earns only 1 point.
The problem specifications and implementations are machine-generated and not always updated in lockstep, but the changes are usually just additions, removals, or tweaks of tests, not wholesale re-definitions of the problem. |
For the first test, the distance from origin is ~12.73 and this is greater than 10 so 0 points are earned. I suspect that you are not correctly calculating the distance from origin. Check out the Wikipedia article on Euclidean distance. |
So, what I missed, is that the function should then calculate the hypotenuse based on the Cartesian coordinates? |
Right. Thank you very much again. |
According to the overview page of the Darts problem, the radius of the concentric circles are defined as:
However, the test "test_just_outside_the_middle_circle" is defined as:
This is confusing because, (also according to the overview page of the Darts problem) the expected number of points for positions under the radius of 5.0 (i.e. middle circle) should be 5 (not 1). This causes the tests to failed (or pushes the user to implement something that passes the test - ignoring the specification of the problem).
I see more discrepancies between some other tests and the specification of the problem.
Am I missing something?
I see the overview page was recently updated (Dec. 2022). Were the tests not updated as well?
The text was updated successfully, but these errors were encountered: