Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I'm attempting this kata in Python, my code keeps passing everything except for the last sample test. It passes everything else, including all random tests. I don't want to presume that the test is wrong (hence me raising this as a question, not an issue), but I'm having trouble figuring out what I might be missing that would cause the code to only fail one of the sample tests and pass everything else.
The return value is correct, as you need to not only make it up to the ghost, but you need to pass the ghost.
But indeed, the random tests should have a special test suite to prevent this, otherwise it's easy to hardcode.
Couldn't this be done with ints instead? Count milliseconds or microseconds or something if you don't like a large unit like seconds.
In practice, choosing random floats isn't likely to pick ambiguous cases. But that's not necessarily a good thing, as those should be handled correctly. As @rdtheriault points out, those only get tested once in fixed tests.
Random tests could also be written such that they intentionally check before/at/after edge cases.
I'm not sure if this is a testing issue (I'll explain in a bit) or an issue but I passed all the random test but one of the example tests failed and I used.
Was that test an edge case, if so, their needs to be more in the random test (testing issue).
Doesn't seem like it should be an issue with the system if others did not have the same issue, but might be something to look into.
One small nit for the JavaScript version is that the use of snake case in method and variable names runs contrary to convention.
Hi,
the order of the given input and the instructions are different: "circular race track (km) and the time you run (h)" ≠ "time,round_length"
The Test description "test 2,1,1000,1000" may be more detailed. Example: "my_speed: 2, ghost_speed: 1, time: 1000, round_length: 1000"
Changed to 100 tests.
10 random tests are not enough. Consequently, they don't cover edge cases enough.
.
ups, forgot to re-check the example tests. Fixed, ty
Python sample tests: