Ad
  • Custom User Avatar

    I think this solution have mistakes because

  • Custom User Avatar

    ( 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.

  • Custom User Avatar

    Approved

  • Custom User Avatar

    Fixed by OP

  • Custom User Avatar

    Python: Random tests are vulnerable to input modification

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    this kata needs a checkup

  • Custom User Avatar
  • Custom User Avatar

    7 kyu in JS; 6 kyu in the other languages (mostly)

  • Custom User Avatar

    Approved

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar

    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.

  • Default User Avatar

    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.

  • Custom User Avatar

    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)

  • Custom User Avatar

    OP left the building, closing!

  • Loading more items...