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.
Added some time ago
Missing sample and fixed tests for
Singular rating input
Output requiring ordinal indicators to be
11th
,12th
,13th
,111th
etc.Description does not explicitly mention how to handle ordinal indicators and the expected upper bounds. But based on current test cases, it should not exceed 20.
should also be language-agnostic
This comment is hidden because it contains spoiler information about the solution
You don't have to worry with strings with less than two characters.
Did you forgot this rule? If you put 1 or 0 symbols it returns "" but should return the same string.
As far as my understanding goes if you go with a minus symbol it starts from the index of the last character and cuts as many characters as you need, -1 cuts the last, -2 cuts the last two and -3 cuts the last three characters just like with positive numbers but in a reversed manner.
You can.
You can. What OP did is use the .slice() method, which removes the first and last portion of the string. Your method is still valid (and is what I ddi too).
The example strongly implies that empty slots should be filled with 'undefined' but the solution reveals empty slots are to remain empty. Description should state "Empty slots are to remain empty".
Approved
Python new test framework
Nice kata.
Guys, need help. My code passes all tests in VS Code, but the CodeWars compiler throws an error on 4 out of 6 tests. What should I do?
I did some research on StackOverflow and i can tell you that slice() works faster than other ones, so the code looks cleaner btw. I might be wrong.
This comment is hidden because it contains spoiler information about the solution
Loading more items...