Ad
  • Custom User Avatar

    my bad.
    sorry.

    very nice kata. learned something new.

  • Custom User Avatar

    Whats wrong with:

    >>> wpp(4, 5, 4)
    [(4, 0)]
    

    ??

    Fails the test.

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    Description says: "the number of teams must be even"

    EDIT:
    If you understand the problem description, you should have a notion of what valid input is.
    Please keep in mind this is not about formal specifications, but about having fun.

  • Default User Avatar

    python, sorry.

  • Default User Avatar

    In random tests length of ops must be one less than of string. However ops and string have the same length.

  • Default User Avatar

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

  • Default User Avatar

    I think this kata can be insightful to people relatively new to OOP, and python in particular.

  • Default User Avatar

    I noticed, when reviewing other solutions. ;)

  • Default User Avatar

    Very concise solution. Impressed. Glad you liked it.

  • Default User Avatar

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

  • Default User Avatar

    Thanks for your feedback!

    Concerning the tests, you are absolutely right -- there should be more verbose messages. Explanation: I wrote them within the unittest framework, and rewriting them to fit the codewars framework was rather cumbersome. With an already working program at hand, I did not get a feel for the tests in the editor, anymore. However, the absolute number of tests is somewhat misleading, as assertions are reused e.g. when iterating through teams, and each assertion counts as a test.

    However, I will add a subset of those tests to the test window. Thanks for pointing that out.

    Concerning half-season vs. full-season, I am afraid I am missing your point. It certainly would not make sense to me if in a 'full-season' teams A and B would compete on days 1 and 2. On the other hand, when solving this kata, implementing full-season pairings becomes trivial.

  • Default User Avatar

    Test failures do not include input strings. Therefore, there is some guesswork involved, but which made it more fun ;-)

  • Default User Avatar

    As the cw currency is honor, I would suggest higher incentive. E.g., solving a kata while still in beta could return twice as much honor (or some other reasonable amount) than solving it after it has left beta.

  • Loading more items...