Ad
  • Custom User Avatar

    The part where the function is called without an argument, like you need to do here. Just scroll a little bit and you'll find it.

  • Custom User Avatar

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

  • Custom User Avatar

    Now you have to work out, how you can make the code work if no argument is passed to it.

  • Custom User Avatar

    You probably edited the sample tests, backup your code, click Reset, paste it and try again. Not a kata issue, the sample tests are fine in Python.

  • Custom User Avatar

    This is not a kata issue. You need to write a function that works with both 0 and 1 argument passed to it

  • Custom User Avatar

    That's a problem with your code, not a kata issue. Your code is doing a division by 0 for some input.

    Note: Empty arrays should return 0.

    Mark your post as having spoiler content next time and use markdown formatting, it's in the Codewars docs.