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.
I think this solution have mistakes because
( JS, probably others )
Returning inconsistent datatypes is not a best practice. There's a reason native
map
throws instead of returning a value; that's the correct behaviour by design.Lots of other problems with the kata design, but most have been raised already. This mess should probably just be retired; it's not worth the maintenance effort.
Approved
Fixed by OP
Python: Random tests are vulnerable to input modification
python new test framework is required. updated in this fork
this kata needs a checkup
6kyu
7 kyu in JS; 6 kyu in the other languages (mostly)
Approved
python new test framework is required. updated in this fork
Kata author is inactive; I've forked the kata to update the description here:
https://www.codewars.com/kumite/64ffa41a3ee3383073c42677
Would appreciate review.
This phenomena generalises over all integers, not just the naturals as expected by the test. If I were writing this from scratch I'd definitely extend it at least include zero, but I'm not and doing so would invalidate existing solutions.
I saw another user had previously reported this issue, and though it was marked resolved, it has not been resolved. For input "0,1,2,3", the expected return value is "incorrect input" even though the input fits the criteria specified in the description (four consecutive numbers separated by commas). If this is considered incorrect input because it includes a zero (which is my best guess), then the description should be updated to use either "positive integers" or "natural numbers" in place of the word "numbers". If this is not the case, then the test case itself should be corrected.
Regardless of the reason the test case fails, the word "numbers" is too inclusive a term to be used in the description. If zero is considered valid input, then the term "whole numbers" should be used instead.
Edit: This is for the JavaScript version. I'm not sure if other versions have this issue as well.
Description does not mention whether negative numbers will be tested
Also inconsistency regarding this part in all languages (No tests in JS, but some in Python, Ruby)
OP left the building, closing!
Loading more items...