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.
You don't need to count the steps, you need to return the length of the repeat(ed) sequence, and 1 is the length of the repeated sequence there.
Read the error message:
Your output has a trailing space.
Read this: https://docs.codewars.com/training/training-example and this: https://docs.codewars.com/training/troubleshooting
No answer after 3 weeks, closing.
You must be reading something wrong because the 3 tests under the too short label have less than 10 elements. Maybe you meant too long instead, if that's the case then the answer is yes.
Your code is wrong and it fails even the first sample test. Debug it properly before creating a kata issue next time, please.
Your code is mutating the input, and you're printing it after it was mutated, print it before doing anything else.
Use spoiler flag next time, please.
Please don't post solutions in Discourse, there is a Solutions section to discuss about them.
I've solved the kata in Python and the error didn't appear. Not a kata issue.
I don't see that error with the initial code, are you sure your code doesn't has an unmatched parentheses?
See the example in the description again, there is no
\n
at the end. I've added a value to the tests to avoid error messages being truncated.In
'foobar0100' should equal 'foobar100'
the first value is what your function returned, not the input. To see the input, print it.@Anjali Singh why did you copy the tests code? Please use the initial code:
Probably you forfeited the kata. Not the same problem as the OP one.
Your code is wrong. It should return either
True
orFalse
, a boolean value, not a string. See the sample tests.Loading more items...