Ad
  • Custom User Avatar

    It's not originally a Python kata ( it's maybe easier in Haskell ). Also, rank inflation.

    That said, I can't fix it for you. Only an admin can, not even the person who approved it.

  • Custom User Avatar

    What's the value of n there?

  • Default User Avatar

    Sure, but a bank account number can vary in length from bank to bank, e.g. in the US it can be "...between eight and 12 digits...". The logic needed for that variation should work with wider ranges too. I don't think simply varying the length puts this beyond 6 kyu.

  • Custom User Avatar

    Not true.

    Python Completions 5895

    So you're saying all those people randomly passed the kata?

  • Custom User Avatar

    what is unclear, then? The idea is that if you just do what you're supposed to do, you don't even have to care about those restrictions (except the one for empty list)

    edit: yeah, I can down vote you too, you know?

  • Custom User Avatar

    How did you get the option for python3? It only gives me 2.7 as an option

  • Default User Avatar

    In Python: Exception is raised by "raise 'Error'"
    Note that you should throw it when guessing with zero lives, not as soon as the lives is ran out. I.e. you can try to guess with zero lives but the error is expected to be raised no matter if the guess right or not.

  • Default User Avatar

    This one one of those, for me, where I struggled and sweated over a convoluted solution, and the top answer was some simple, obvious-in-retrospect one-liner.

  • Custom User Avatar

    And the return to 1 should be True using this method

  • Custom User Avatar

    Clojure was not the original language maybe? But I have to agree, this can be hard for newbies in any language.

  • Custom User Avatar

    Added sample tests in JS

  • Default User Avatar

    totally agree! The prime number factoring is easy, the nitpicky 'edge' cases are silly (why return [] for 'a' ?????? ! and [1] for 1 - when 1 is not a prime number). The error handling is more difficult than the stated prime number problem.

    I got totally lost trying to handle what was, I assume, it was hard to tell what the input was, complex numbers. Frustrating waste of time. There are other prime number factoring katas here that make much more sense.

    ------- added later ....
    Well, my bad on the complex numbers. It was me generating them. But, even with the problem solved, the error handling involved in producing a solution was not fun and it's a shame because the prime number related bits of this kata are nicely presented.

  • Custom User Avatar

    Seems like it's working, just tested it

  • Default User Avatar

    Description says:

    so that the sum of the distances is the biggest possible

    146 is not the biggest possible (less than 331)