Ad
  • Default User Avatar

    your function should return instead of printing

  • Custom User Avatar

    Your function should return the result instead of printing it. Check the Codewars docs on the left.

  • Custom User Avatar

    Python:
    I think I may misunderstand the instructions or how this training thing works in general. I'm getting the proper output based on what the instruction asks for but all tests are failing. This is my second kata that I've had this issue with, so maybe I'm doing something wrong?

  • Custom User Avatar

    Thanks for your contribution. Approved!

  • Custom User Avatar

    Closing for reasons mentioned above. Please re-raise it if you're still having issues.

  • Custom User Avatar

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

  • Custom User Avatar

    Could you show which solution had such problems? I looked at your submitted solutions and others, and they all pass both sample and attempt tests.

    It's possible that you modified sample tests by accident, causing some error. Could you confirm this? (hit the reset button and try again)

  • Default User Avatar

    define "wrong"

    maybe what you're testing locally isn't what you're failing. passing one test isn't a very strong promise of that it's going to pass all the rest.

    if you describe the problem as only "wrong" then the problem may be that you're not looking at what is happening! you've got console.log for that.

    if you must post code, use the spoiler tag. ideally avoid it completely.

    running your code in the kata produces error messages saying that you return "undefined". what does return mean?

  • Custom User Avatar

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

  • Custom User Avatar
  • Default User Avatar

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

  • Custom User Avatar

    Approved

  • Custom User Avatar

    That arrays are zero-indexed, so, for an array of length 3, the valid indices are 0, 1 and 2.

  • Default User Avatar

    what does Index 3 out of bounds for length 3 mean?

  • Default User Avatar

    Weird, but when done it in Prolog, my solution didn't pass the Test, but I tried the Attempt anyway and it passed and I could Submit my solution. Is there a problem with the Tests? Anyone had the same issue?

  • Loading more items...