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.
There is apparently a namespace conflict in the Python testcases that doesn't allow you to
import string
. You will get an error like this:AttributeError: 'str' object has no attribute 'letters'
This happens only in the random tests. It is because 'string' is used as a variable name, so it would be easy to fix.
A workaround is either to solve it without importing
string
or to import it without using thestring
namespace - e.g.from string import letters
.This comment is hidden because it contains spoiler information about the solution
The mods are supposed to add translations in this case, but apparently there is no reliable way to contact them on this site. I marked this as an issue to try to get their attention but that obviously did not work. I suppose it will just happen at random whenever a mod happens by the comments here.
It is kind of hilarious that this is getting so many "Best Practices" votes and it doesn't even work! I guess people don't read the comments...
It should be disqualified but there is an unfixed bug in Codewars that is preventing the Kata author from submitting a fixed Java test fixture.
Was going to do a Haskell translation but I noticed there are Python and Java translations sitting there that have not been added. I think I will wait until those are added, first.
The Java test cases are broken. It allowed my first solution (actually a buggy disaster) to pass, embarassingly.
Note that only one of the 11 tests actually passed!
For my new, correct solution, it does say that 11 tests have passed:
Someone more knowledgeable about Java needs to figure out what is wrong with the testing code.
Actually, it is worse than you thought. I actually don't know if this works at all! I think the Java tests for this Kata are actually broken.
Notice anything? It only says "1 passed" and doesn't mention the other 10 tests!
So it looks like the buggy test code allowed my buggy code to pass. How embarassing. :) Thanks for catching this, btw. I will have to debug my solution and the test code.
This comment is hidden because it contains spoiler information about the solution
I found this part of the description to be misleadingly ambiguous:
It needs to be more clear that you are counting both falling and bouncing. The way I first understood it was that "falling and bouncing" was a single event.
Change it to something more like:
(The phrasing seems a bit awkward but at least it is clearer).
Well, it was only designed to pass the actual Kata tests. It could start with a rate >= 21 and it would work fine for your example. But having everything being a neat multiple is quite artificial anyway, so I don't see any need to make it more general or robust. I'll save that for whenever I try the "Morse Code for real" Kata (currently in beta).
This kata appears to be a duplicate of http://www.codewars.com/kata/sudoku-solution-validator
I succesfully submitted my solution to that kata here with trivial changes.
This comment is hidden because it contains spoiler information about the solution
I actually wrote this several weeks ago, but it did not succeed and I could not figure out why, because my algorithm seemed perfectly solid. I moved on to other katas. I came back to it today and submitted it just to see what the error was. To my great surprise, it succeeded! Evidently, the test cases simply had something wrong with them before. Nice to feel vindicated.
I'm getting a similar error:
It has to be broken because a negative page or item (depending which function is being called - I can't actually tell) has to be invalid, and therefore a Nothing.
I have submitted a Haskell translation. I used testcases that fit the description rather than imitating the Python testcases. Namely, they do not test sizes smaller than 5. I hope that is okay. If not, the description should be corrected.
I enjoyed the Kata, btw!
Loading more items...