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.
This comment is hidden because it contains spoiler information about the solution
I had some errors on the random tests and I still got it through by brute forcing it, and doing it a bunch of times. That should probably be fixed.
Probably a 6
What kata rank would you give this one (for Python)?
Please, could you explain the solution? I'm kinda lost on what was done and why it worked.
Thanks
This comment is hidden because it contains spoiler information about the solution
This solution is based on the length of the resulting string, so replacing with spaces won't change the length of the initial string because space is still counts towards the length as 1 character, while you want to get the length of the string consisting only from remaining chars.
I did the same thing but I replaced it with the space instead of ''. Can someone explain me please why my version didn't work (it sometimes had more numbers) but this one does? If in the description it's told that there should be spaces :/
R translation. Please review and approve
https://www.codewars.com/kumite/634861f5adea5200238629ba?sel=634861f5adea5200238629ba
R translation. Please review and approve
https://www.codewars.com/kumite/63485abc43c0550030ef64d0?sel=63485abc43c0550030ef64d0
That's awesome!
Doing math and calculating things with no explanations why is the formula used by the solution calculating what we want is not "simple kata". That's called guessing.
"Based on last year's result and guessed vote swing, you have to predict the order in which the parties will fare this year."
Its a simple kata, any explaining the exact working with an example is like giving out the solution
The description does not mention at all what and how things are calculated, which it should (currently this is all in the comments section).
Possibly, there is inaccuracy in tresting.
One of random tests didn't pass:
STDERR
Traceback (most recent call last):
File "tests.py", line 25, in
test.expect(abs(expected[1]-actual[1])/expected[1] < 1e-10, "Relative error for compound interests should be less than 1e-10: {} should be near {}".format(actual[1], expected[1]), allow_raise=True)
ZeroDivisionError: division by zero
Loading more items...