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.
JS: missing random tests
National Identity Number is not a numerical value and should not be modelled with numeric data types. PINs, serial numbers, credit card numbers, ISBNs, phone numbers, are formatted strings (potentially, but not necessarily, limited to decimal digits) not numerical values, and representing them with
int
or a numeric data type is a design error.This comment is hidden because it contains spoiler information about the solution
Python new test framework should be used (Refer this & this for more detail)
Ruby 3.0 should be enabled (Refer this & this for more detail)
Oh come on, if your program gets "3angle" as an integer input, you should let it die, not pass the error silently to the next unsuspecting function.
So why are there tests with
n
being a string?In C# version:
If tests expect instance of exactly
System.Exception
to be thrown (and that's bad, BTW), it should be mentioned in the description.Ruby translation, please check and approve :-)
The test cases don't check the case [n > length of the string], but the instructions demand to handle that case:
"If n is greater than the lenght of the string, you should return an array with the only element being the same string."
So currently that part could be left out and you still get to submit your final solution.
Typo in description:
"If n is not a valid size(> 0) (or is absent)" should be <0 (less than 0) rather than greater than 0 as it's describing invalid conditions.
Also a small typo in the next line 'lenght' --> 'length'