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) I could not solve this kata for a while because I had incomprehensible errors. Eventually, after having a detailed look at basic tests, I understood that they run tests with ranges of integers to check output is different on every function call. To pass those tests one needs to make sure the input is converted to a list before using it (or solve the kata in a different way of mine, which was shuffling the input list). That's a very bad thing, because those tests are completely out of the kata description and requirements, we're supposed to receive a list/array!
Use
Test.assert_not_equals(rota(range(100)),rota(range(100)))
to check the randomness is a bad idea: there is always a small chance to get the same array. At least, a note should be add to the description to "try again in case of failure, because...".JS tests are still quite inadequate. This should never have passed.
There are functions defined for better testing, but they're never invoked ?!?
No Example tests either.
Not good.
In Python, final test gives me an error: 'AttributeError: 'builtin function or method' object has no attribute 'shuffle'' - what does it mean? You have something against random.shuffle()? ;)
oh I see that there were discussions about the tests. Sorry I missed that. I´ve changed my issue for a suggestion.
Also, the kata does not specify if in the duplication all the rooms occupied should be part of the random output, for example if there are 5 rooms occupied, a solution can just be to take always room number 1. But this can be an acceptable solution if defined that way.
Nice kata, but not quite ready yet...
I translated the kata into ruby for your approval. In the translation, I added some random tests :)