Ad
  • Custom User Avatar

    You're trying to cast to int something that can't be.

    Return nil (or your language's equivalent) for invalid inputs.

  • Custom User Avatar

    I'm getting the same thing. Passed all 8 tests in Python but I'm getting an exit code with error: ValueError: invalid literal for int() with base 10: ''
    Can't figure this one out.

  • Default User Avatar

    (Python)
    Passed all 8 test but still getting this:

    Traceback (most recent call last):
    File "main.py", line 15, in
    Test.assert_equals(up_array([]), None);
    File "/home/codewarrior/solution.py", line 11, in up_array
    num = int(num)
    ValueError: invalid literal for int() with base 10: ''

  • Default User Avatar

    python