Ad
  • Custom User Avatar

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

  • Custom User Avatar

    doesn't "elif n is None:" cover that tho?

  • Custom User Avatar

    def arr(n):
    x = []
    if n == 0:
    return []
    elif n is None:
    return []
    else:
    for i in range(n):
    x.append(i)
    return x
    '''
    Traceback (most recent call last):
    File "/workspace/default/src/codewars-test/codewars_test/test_framework.py", line 111, in wrapper
    func()
    File "tests.py", line 7, in basic_tests
    test.assert_equals(arr(), [])
    TypeError: arr() missing 1 required positional argument: 'n'

    '''
    I don't understand the error with my code above.

  • Custom User Avatar

    I still can't figure it out...

  • Custom User Avatar

    What does the following error mean?
    Traceback (most recent call last):
    File "main.py", line 14, in
    test.assert_equals(hello(), "Hello, World!")
    TypeError: hello() missing 1 required positional argument: 'name'