Ad
  • Default User Avatar

    Thank you. It finally worked after I added an if statement to handle the situation when words is an empty string.

  • Custom User Avatar

    It passes all tests until it throws an error and it doesn't keep running. There are more tests after that, 30 random tests in Python to be exact.

  • Default User Avatar

    But in that case, how is my code passing all the test cases?

  • Custom User Avatar

    That error comes from your code, maybe words is an empty string there.

  • Default User Avatar

    Still facing the same problem. This is what I'm getting:

    Time: 662ms Passed: 17 Failed: 0 Exit Code: 1

    Test Results:
    Basic Tests
    Test Passed
    Test Passed

    Random Tests
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed

    STDERR
    Traceback (most recent call last):
    File "main.py", line 24, in
    randtest(30)
    File "main.py", line 17, in randtest
    test.assert_equals(to_nato("".join(strIn)), " ".join(strOut))
    File "/home/codewarrior/solution.py", line 9, in to_nato
    ind = ord(words[0]) - 65
    IndexError: string index out of range

  • Custom User Avatar

    tru submitting again(not a kata issue, site error which occurs once in a while)

  • Default User Avatar

    My code (Python) is passing all the test cases. But it also shows a stderr. So, I can't submit. What could be wrong?

  • Default User Avatar

    I'm having the same problem. Only one test case failed. I have no idea what I'm doing wrong.