Ad
  • Custom User Avatar

    The default parameter name 'processes' conflicts with the function name. I would change it to processes_list, or something else.

  • Custom User Avatar

    I passed it too. But I guess the way I was solving it was unorthodox. The solution was simplier than I thought. :)

    That's one of the reason why I love codewars, we start with a problem, solve it the best way we could, just to find that someone solved it in a better/faster/pretty way.

  • Custom User Avatar

    Made changes, try your answer again, this time it should fail. :)

  • Custom User Avatar

    Sound good, I'll work on it. My solution already does that, It will be easy to adapt.

    I noticed that the kata you linked treats sudokus with multiple solutions as valid.

  • Custom User Avatar

    A sudoku game should have only one solution. In case it have more solution the function should be expected to raise an error like IndexError("Puzzle answer is not unique.").

  • Custom User Avatar

    Oh, didn't see that kata.

  • Custom User Avatar

    Feel free to provided test cases that would fail invalid solutions.

    Since I'm not a native english speaker it may contain some errors, please provide the correct way and I'll change it!

    Thanks.

  • Custom User Avatar

    Using range instead causes MemoryError. Which is expected since xrange is a generator making numbers on the fly while range makes all the list and store it in the memory.

  • Custom User Avatar

    Nice Kata, I find it funny how I started with a over complicated attempt and ended in a very robust one. Keep it coming :)

  • Custom User Avatar

    If you think it's to easy using the library, well, just implement it without it. :)

  • Custom User Avatar

    The python version of this kata should be redone, insteand of having the user to shadow the built-in list, it should have a class myList(list) and the user should implement the methods of this kata in the derived class.

    I agree with otakucode, shadowing the built-in is a bad idea, and while Azuaron may have a point, that it's nice to understand that you CAN do it and learn that it's a bad pratice, this kata suggest that this is a common thing to do (which in other languages it may be). At least there should be a note somewhere that states that it's a bad pratice to do that in Python. This is a low rank kata afterall, if this was at least 4kyu I wouldn't botter writing this, because programmers of this 4kyu and above should understand the dangers of shadowing the built-ins.

    For me codewars should have katas that aim to improve your coding abilities giving you insightful puzzles, and not give you cumbersome implementations that you should find that aren't usefull at all. Even thou you will learn something in the process. Is like having a kata where the user is required to use eval/exec with some 'user input' just to have some malicious code in one of the inputs.

    Anyway, nice kata. I enjoyed!

  • Custom User Avatar

    I found this to be annoying too, one should never mess with built-ins.

  • Custom User Avatar

    ints() will be called every time you use any of the functions, which is redudant, you should overwrite init and do the isinstance(x, int) in there instead.

  • Custom User Avatar

    I'm getting OverflowError: Python int too large to convert to C long. with productFib(256319508074468182850). That's because xrange() requires its arguments to fit into a C long. I'm manage to work around using itertool.count(1) and break but it seems annoying.

  • Custom User Avatar

    This is not valid answer since "(abc) abc-abcd" would return True.

  • Loading more items...