• Custom User Avatar

    True; that'd be a little more robust.

  • Custom User Avatar

    Also your solution doesn't handle empty words (when there are two or more spaces in row in string)

    That's completely false.

    However, you are right about the non-ASCII first letters.

  • Custom User Avatar

    But watch out for the classic rookie fallacy - assuming that having one loop where you do five things per iteration is innately superior to having five loops where you do one thing per iteration.

  • Custom User Avatar

    That feel when your bubble sort turns into selection sort

  • Custom User Avatar

    As Blind4Basics said. The creator or someone with a high enough rank should edit the problem description.

    Every kata (with the possible exception of myjinxin2015's Thinking & Testing series) should be solvable on the first try. That means the problem statement has to be well-defined.

    More generally, just because a kata is 7- or 8-kyu doesn't mean it shouldn't be well-constructed. Let's not set the precedent of allowing people to flood the site with low-level, low-quality kata that are all variations on the same theme. I do believe that "easy" kata are still valuable and useful in many ways, but we should be taking advantage of the peer-review process on this site in order to set higher standards and raise the overall quality of our writing and coding skills.

  • Custom User Avatar

    Define what the constraints on the inputs are (will negative numbers be supplied? etc.) and what the function should do when given input for which the answer is undefined.

  • Custom User Avatar

    Now that's one line of code :D

  • Custom User Avatar

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

  • Custom User Avatar

    %Y not zero-filling in Python is now a pet peeve of mine.

  • Custom User Avatar

    Fix the Python tests so that they accept integer division as well as float division.

  • Custom User Avatar

    Finally got around to finishing this monster. Great kata!

  • Custom User Avatar

    Thanks, that did it! I needed to re-raise the exception.

  • Custom User Avatar

    Are you a professional golfer?

  • Custom User Avatar

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

  • Custom User Avatar

    So it seems I'm only having problems with closer now. I logged the output before and after when I got an error. Note that it didn't do the invalid self bond, as expected.

    This isn't how closer works?

    brancher (6,)
    bounder ((1, 1, 1, 1),)
    closer
    [Atom(C.1: C2), Atom(C.2: C1,C3), Atom(C.3: C2,C4), Atom(C.4: C3,C5), Atom(C.5: C4,C6), Atom(C.6: C5)]
    [Atom(C.1: C2,H,H,H), Atom(C.2: C1,C3,H,H), Atom(C.3: C2,C4,H,H), Atom(C.4: C3,C5,H,H), Atom(C.5: C4,C6,H,H), Atom(C.6: C5,H,H,H), Atom(H.7: C1), Atom(H.8: C1), Atom(H.9: C1), Atom(H.10: C2), Atom(H.11: C2), Atom(H.12: C3), Atom(H.13: C3), Atom(H.14: C4), Atom(H.15: C4), Atom(H.16: C5), Atom(H.17: C5), Atom(H.18: C6), Atom(H.19: C6), Atom(H.20: C6)]
    
  • Loading more items...