Ad
  • Custom User Avatar

    Yes, I think you guessed right. If f is an empty filter object (list(f) == []), then in Python 3 bool(f) returns True which is why you do not get what you expected.

  • Default User Avatar

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

  • Custom User Avatar

    Third line checks if there are any columns, rows or blocks which are not a set of numbers from 1 to 9.
    Second line helps define blocks.
    Does this help you? You can ask more specific questions if you are missing something.

  • Custom User Avatar

    the %s are placeholders
    the string is formatted by replacing the placeholders with the corresponding values from the tupel.

  • Default User Avatar

    Actually, that was the sample tests. Here is something for the first fixed test:

    game word is: aver
    
    Alice : aver to over
    Bob   : over to oven
    Alice : oven to oxen
    Bob   : oxen to ....
    

    and okay, why not, here is the entire first set of fixed tests:

    alice = ["fare", "cans", "left", "slap", "gain", "slam", "pate", "even", "mane", "peel", "flat", "oxen", "claw", "meet", "mats", "pulp", "over", "faze", "goat", "gone"]
    bob   = ["oats", "gaze", "feet", "feat", "pats", "golf", "cope", "maze", "caps", "flaw", "boot", "slaw", "pare", "oven", "mine", "clap", "goof", "cane", "fool", "oast"]
    test.assert_equals(mutations(alice[:], bob[:], "aver", 0),  0) # Alice goes  first, Alice   wins
    test.assert_equals(mutations(alice[:], bob[:], "spam", 0),  1) # Alice goes  first, Bob     wins
    test.assert_equals(mutations(alice[:], bob[:], "gulf", 0),  1) # Alice fails first, Bob     wins
    test.assert_equals(mutations(alice[:], bob[:], "wren", 0), -1) # Alice fails first, neither wins
    test.assert_equals(mutations(alice[:], bob[:], "maps", 1),  1) # Bob   goes  first, Bob     wins
    test.assert_equals(mutations(alice[:], bob[:], "oars", 1),  0) # Bob   goes  first, Alice   wins
    test.assert_equals(mutations(alice[:], bob[:], "moat", 1),  0) # Bob   fails first, Alice   wins
    test.assert_equals(mutations(alice[:], bob[:], "kiln", 1), -1) # Bob   fails first, neither wins
    
  • Default User Avatar

    Hi, the breakdown for this test is found in the kata description:

    3. In the case of word = "maze" and first = 0:
    * Alice responds to maze with mare
    * Bob responds to mare with more
    * Alice responds to more with pore
    * Bob responds to pore with pure
    * Alice responds to pure with pare
    * Bob has no valid response to pare
    * Alice wins the game.
    

    Hope that helps, best of luck!