Ad
  • Custom User Avatar

    Fixed

  • Custom User Avatar

    Added random tests to python too.

  • Custom User Avatar

    Add # -*- coding:utf-8 -*- to the first line of your solution and test case.

  • Custom User Avatar

    You're not meant to modify the original array. It's bad practise to modify it because it will change it permanently and you can't reverse the process. Here is an example (written in Python):

    The Kata author has designed it in such a way that the array will be the parameter for the function of the expected results. This means that the modified array that you are returning will be the parameter instead of the original array. To curcumvate this problem you need to create another array and push it this one instead, or you can copy/duplicate the array within the function (but make sure you do it properly - don't just create a new variable equal to the original array).

  • Custom User Avatar

    You have to have a default argument because the function may be called with the parameter omitted. Adding "name" as a parameter when it is called with it omitted will lead to an error because an argument is expected (but it doesn't occur).

    This is proven by the testcase:

    howManyLightsabersDoYouOwn(), 0)