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.
python new test framework is required. updated in this fork
Python: Random tests are vulnerable to input modification
I'm still having difficulty with rounding errors. Best policy for katas is not to round results before comparison, but to use a proper fuzzy comparison with an appropriate margin of tolerance, such as with the test framework routine named
assertApproxEquals
or something similar. Rounding has the potential to magnify an error if it happens to be close to the split between rounding up and rounding down and the reference solution goes one direction while the user's solution goes the other way even though their absolute difference may be very small. See https://docs.codewars.com/authoring/recipes/floating-point/ for more information about best practices when dealing with floating point numbers.