• The expected method should be static.

  • No sample tests.

  • Thanks for assitance!

  • This comment is hidden because it contains spoiler information about the solution

  • Hey, sorry I wasn't here in a while, things with life and work are crazy right now :( I see you have 2kyu, would you be willing to clean up translations with broken tests? I only wrote this kata in Java originally (never knew it would get so popular), so most of the translations are 3rd party. What Im trying to say feel free to "admin" on whatever you see broken :) Can I give you some extra permissions to meddle with this Kata?

  • isNaN is entirely unrelated to whether a string represents a number
    it answers the question of whether a value is the particular value NaN

    you could of course hope that failed conversion to Number results in NaN, but, yikes.

    (also, redundant ternary, it turns true to true and false to false, you already have that same without boolean applying that operation)

  • @provector I see you've logged in this month - is there any chance you'd be willing to improve the tests of at least one translation?
    There are no tests for multiple decimal points, what about comma vs period, what about 10e7, what about ".0" and "0.", what about languages with different ideas about what a valid float literal looks like?

    Currently, solutions that think "...." is a number pass, and probably a bunch of other similar things - it would be good if a beginner kata was a bit more accurate because beginners themselves are likely not to be aware of that their solution isn't right.

  • C# (translator last seen 3 years ago)

    misuse of IsTrue assertion here:
    Assert.IsTrue(CodeWars.IsDigit(input) == expectedResult);
    this will end up saying it expects true even when it expects false

    random tests are also lacking, too easy to hardcode if (x[0] == 'f') or something like that, maybe some other language has a better test that can be translated

  • This comment is hidden because it contains spoiler information about the solution

  • Yes, you're on the right track. There multiple ways to handle that kata.

  • Hello. I have a question I would like to ask the community:

    is it useful to handle exceptions?
    because I notice that when I try to convert the input of the function (the string) to float, I can't when it's anything other than an int.
    so I suppose we have to adapt the condition to take into account the case where the string is not convertible to floating or integer.
    therefore exceptions must be handled.
    could someone tell me if I'm on the right track?

    thank you for your possible feedback.

  • There are 2 Basic tests in Sample tests (that's why it's a sample) and in Submit, there are 11 Basic tests.

  • This comment is hidden because it contains spoiler information about the solution

  • Don't you think it's incorrect to tag it "functional programming"?

    Or don't you think incorrect tagging is an issue?

  • Loading more items...