Ad
  • Custom User Avatar

    Not an issue. Your solution probably runs into an infinite loop, and you can print the inputs.

  • Default User Avatar

    My Attempt failed becasue of timeout. Unfotunately I don't see how many Test case from how big pool passed. It would be fine to know where is my alghoritm. I only see that 0 passed 1 failed exit code -1.
    Could you please help me.

    Thanks

  • Custom User Avatar

    I also have the same result. I have no idea where it is getting the extra 1 from? So strange...

    In IRB mine works perfectly...

  • Default User Avatar

    .

  • Custom User Avatar

    I am sure that there's an error in this test, just because I inserted this line into my code:

    if coordinates == '-177.96186842018926, 53.94099':
    return True

    And then it seemed to work. I used Python.

  • Default User Avatar

    Warning : I don't know what langage you train, but the output is not always clear on what's happening : when the output is something like '-177.96186842018926, 53.94099' failed to validate, this means only that your code didn't do what was expected. BUT !! That doesn't mean that the expected answer was true, just that your code didn't give the correct answer.

    Now, considering that a lot of guys did complete this kata, I suggest you to watch carefully at your code, I think the "issue" lays there... ;)

    I close this issue, assuming that this is a misunderstanding of the output of the tests (which are not really clear, once again). Feel free to post a new issue if you can confirm that there is effectively a problem in the tests (please give the langage you use at the same time if you do).

  • Default User Avatar

    Hi,

    I have the same issue even though I clear array which I use to pass next version of array for recursive function calls.
    def snail(array, Lista=[]):

    next call of thsi function is:
    snail(array, Lista)

    I don't understand why thi array isn't cleard in first call - each next step. Seems like these Test Cases do it recursively.

  • Custom User Avatar

    Post on the "snail" discourse page and also post your code (since I can't help you without it).

  • Default User Avatar

    Hi,

    Thank you for your replay!
    I jus figue out what was wrong. The example tests accepted None value. My function returned None in case when had to return False. I have added one if and it works perfectly.

    However I have still problem with other Kata. Could you plase try to helpe here?
    Kata name: Snail
    Time: 123ms Passed: 2 Failed: 1
    Test Results:
    Log
    []
    ✔ Test Passed
    Log
    [1]
    ✔ Test Passed
    Log
    [1, 1, 2, 3, 6, 9, 8, 7, 4, 5]
    [1, 1, 2, 3, 6, 9, 8, 7, 4, 5]
    ✘ snail([[1, 2, 3], [4, 5, 6], [7, 8, 9]]): [1, 1, 2, 3, 6, 9, 8, 7, 4, 5] should equal [1, 2, 3, 6, 9, 8, 7, 4, 5]

    When I do example test or run my code on PC autput is correct: [1, 2, 3, 6, 9, 8, 7, 4, 5]

    Any idea what may be wrong here?

  • Custom User Avatar

    One of the tests in this kata is broken
    '-177.96186842018926, 53.94099' is expected to be true due to the tests, but the first value is not in range of (-90; 90)

  • Custom User Avatar

    Print the input parameter to the console to see where you went wrong - e.g. Javascript -> console.log(coordinates).

    It's hard to determine the problem without seeing your code. So if you post it to a reply to this comment I can help you.

  • Default User Avatar

    Hi,

    Could you please help to figure out what is wrong with my sollution?
    All "Example Test Cases" passed but all real cases failed as: "failed to validate"

    Output:

    Time: 94ms Passed: 15 Failed: 100
    Test Results:
    Example Test Cases
    should return true for valid coordinates (7 Passed, 0 Failed)
    should return false for invalid coordinates (8 Passed, 0 Failed)
    Real Test Cases
    should return the correct value for random cases
    ✘ 95,,,67362,,--1 failed to validate.
    ✘ 12.974.6...56, 16,,48546,479 failed to validate.
    ✘ 2,1,5,, -226, failed to validate.
    ✘ 177,657280--246,71937 failed to validate.
    ...

  • Default User Avatar

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

  • Default User Avatar

    Hi,

    I Think the 3-rd Test Case is wrong.
    I got such result:
    ✔ Test Passed
    ✔ Test Passed
    ✘ snail([[1, 2, 3], [4, 5, 6], [7, 8, 9]]): [1, 1, 2, 3, 6, 9, 8, 7, 4, 5] should equal [1, 2, 3, 6, 9, 8, 7, 4, 5]

    When I'm trying the same as my test it works well:

    array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
    expected = [1, 2, 3, 6, 9, 8, 7, 4, 5]
    test.assert_equals(snail(array), expected)

    Result:

    Time: 118ms Passed: 1 Failed: 0
    Test Results:
    ✔ Test Passed
    You have passed all tests! :)