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.
As a concrete example, the reason why rounding to 2 decimal places is not a panacea is there is one test where one of the values is -5.055
Depending on the order in which you do the calculations, you may get -5.05499999 or -5.055000001, which round to different results in two decimal places.
Random Tests are already added. When i'm ready with the floating point issue the tests musst be renewed. I will extend the Random test part.
The necessity of random tests is documented. You should probably read more documentation before creating your next first kata ( this one will probably be retired ).
Rounding is not a solution to floating point representation errors, comparing with an error margin is. This is documented.
I testet offline and online and got no rounding problems. I round because of floating point errors. Don't know how to clarify this.
Maybe with a precision parameter.
Don't round the results. Random tests are consistently rejecting correct solutions because of floating point errors.
Randomtests added.
It's my first cata, i will add random tests. I changed last sample test to n = -3 but unpublish,-> save - publish will go on showing wrong number 4. Sad!
This comment is hidden because it contains spoiler information about the solution
Amazing Kata, thx!
Absolute annoying that we must guess which exception to be raised. Put a little more work into Kata's u created pls.
I have modified the tests so that, even if the user's code modifies the list of customers, the validation messages refer to the original customer list. I also modified the validation procedure to give a diagnostic message that explicitly compares the number of rooms used by the user solution to the correct number of rooms.
(This refers to Python - I will do the other languages as soon as possible.)
I am traveling without access to a computer, but I think what is happening is that your code is modifying the list of customers. I added something to the description clarifying that should not be done.
Once I get home I will modify the validation procedure to provide clearer debugging messages.
This comment is hidden because it contains spoiler information about the solution