Ad
  • Custom User Avatar

    The secret is to test every aspect of the problem. Then, you have to go to GPT or Stack and figure out .name even exists. Not a level 8, but curcial stuff to learn

  • Default User Avatar
  • Custom User Avatar
  • Custom User Avatar

    User solutions that return wrongly typed values are just bad, and the error message is quite explicit.

    Maybe if it were an 8kyu kata I'd expect tests to mollycoddle solver, but this one, a 6kyu - well, not really.

    Other opinions (!) are doubtlessly available.

  • Custom User Avatar

    I would keep the issue open. Tests which crash on an unexpected value returned by user solution are just bad.
    Tests should properly inspect returned value for correctness and not just crash.

  • Custom User Avatar

    Not a kata issue. The error is pretty clear about the fact that your function returns nothing.

  • Custom User Avatar

    Hello I get Traceback by just printing values
    My CODE on PYTHON 3.8:

    def two_sum(numbers, target):
    print(target)

    Output:
    Test Results:
    Log
    4
    STDERR
    Traceback (most recent call last):
    File "tests.py", line 3, in
    test.assert_equals(sorted(two_sum([1,2,3], 4)), [0,2])
    TypeError: 'NoneType' object is not iterable