Ad
  • Custom User Avatar

    please add check for '+-', '-', '/', '-/', '+-', '+-/' and other same strings! because in some solution have "... if op in '+-/' else ..." and if i take (1, 5, '+-') it's will be a mistake exception!!!

  • Custom User Avatar

    What is it?

  • Custom User Avatar

    There is something wrong

  • Custom User Avatar

    Reading the error message would help to debug and fix your code:

    Your function should be able to handle floats
    Failed asserting that 'unknown value' matches expected 1.
    Expected: 1
    Actual  : unknown value
    

    Your code returns "unknown value" for floats, it's your code's problem, not a kata issue.

  • Custom User Avatar

    It's not an issue if you don't tell us what the "issue" is!

    If you really think there is an issue, then please provide the language in question, and description about how the kata is wrong. Is there a specific test that is wrong, or some kind of error you're getting?

    Closing due to lack of information. Please read the documentation available before creating issues like this, for example https://docs.codewars.com/training/troubleshooting

  • Custom User Avatar

    there is an isuue in this problem

  • Custom User Avatar

    Question resolved.

  • Custom User Avatar

    Not a kata suggestion. Resolved.

  • Custom User Avatar

    The error you see happens before the check. The error is raised in line 2, and your check is too late, in line 3.

    It's a bug in your solution, not a kata issue.

  • Custom User Avatar

    That's a problem with your code, not with the kata.

  • Custom User Avatar

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

  • Custom User Avatar

    I don't get it ? ...isn't supposed to be simple fundamentals ?
    I write in JS so typeof is default XD

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Can someone with edit abilities please add the following 3 tests to the Error Test Cases section. Currently this specific test is only being done for +, not the other operators, and it's allowed some solutions to get through (and be highly upvoted) that don't actually meet all the requirments in the description.

    test.assert_equals(calculator(":", ",", '-'),"unknown value")
    test.assert_equals(calculator(":", ",", '*'),"unknown value")
    test.assert_equals(calculator(":", ",", '/'),"unknown value")

  • Loading more items...