Ad
  • Default User Avatar

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

  • Default User Avatar

    Hi! I have written a code (will append it in a comment to this post) and below is what I get when I attempt to pass it. Can anyone explain why the two examples do not work? I can not figure it out since I do not see the actual input, only the results... Thank you!

    Time: 574 ms Passed: 114 Failed: 2 Exit Code: 1
    Test Results:
    ...
    What if there is no delimiter?
    ['abc', 'def', 'ghi\tjklmno\t\t\t\tprrrr'] should equal ['abc', 'def', 'ghi', 'jklmno', 'prrrr']
    ['abc', 'def', 'ghi\tjklmno\t\t\t\tprrrr'] should equal ['abc', 'def', 'ghi', 'jklmno', 'prrrr']
    ...
    Good job!

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    Nice - but I think that if you passed a bool or list (etc.) as the variable num, it would actually not work - or am I wrong? Where do you check if the num variable actually is an int before processing it?

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    In description is:
    "Input: (...) The numbers in the array can be any integer positive or negative."
    And then in tests there is for example [0,8]. Zero (0) is neither positive nor negative so the description is wrong.

  • Default User Avatar

    Testing for [42, 9, -4, 3, 1, 9, 8, 0, 5, 17, 0, -16, -1, 20]

    Failed attempt: 0 should equal 3

    42 + 9 - 4 = 47... (index 3) ... 1 + 9 + 8 + 0 + 5 + 17 + 0 - 16 - 1 + 20 = 43

    1. there is an error, but it is not in my code, 47 is NOT equal to 43...
    2. when I run my code with this dataset in Python, it actually returns 1, not 0, so there is another problem as well