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.
Yeah, good call. I updated the tests to check for each color. What are the chances of 1 of the 4 possible colors not occurring among 100 ghosts?
Even better would be to test that each color occurs with roughly even frequency. Otherwise, solutions that can return any color, but that favor certain colors, will pass.
I wrote a cheat solution to demostrate this: http://www.codewars.com/kata/reviews/53f1017634b84bb1e7000113/groups/53f34736b572bb12cc001252
@cmgerber:
Your itertools solution fails because the function returns an iterator rather than a generator. All generators are iterators, but not all iterators are generators.
I have updated the description of the kata to emphasize this.
I have also disabled itertools.permutations as it makes the kata too easy :)
@xcthulhu:
the permutations function only needs to take one argument - the 2nd argument being passed was a bug which has since been corrected.
@cmgerber: I think electricjay's permutations takes a second argument, which behaves differently than the builtin's second argument.
Personally, I'd rather electricjay's permutations function have the same API as the builtin, but then this exercise would be trivial...
Absolutely. The actual correct answer whould be a list of tuples. I will update the comment. Thanks
There was a bug in the validation routine.
I have published a new version. Give it a try.
It seems that there are no test-cases for checking unique values on columns.
Could you please add some?
Moreover, codewars adds some code before the text fixture; this is probably why its saying line 17. Still, I can't reproduce this error...
The error is coming from the test suite. Not sure why this is happening...
thank you!
thinking c++ (on work) and trying write python haha
all issues fixed. :)
They were, we just missed adding Python to the profile view. Should be fixed now.