Ad
  • Custom User Avatar

    You can see other users solutions and learn a few things that way too.

  • Custom User Avatar

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

  • Custom User Avatar

    I confirm your code returns True, my python version is 3.6.9.
    Due to the indentation of horizontal.clear() vertical.clear() matrix1.clear() matrix2.clear() matrix3.clear()
    The initialization of the same lists won't take place more than two times.

  • Custom User Avatar

    Your solution fails for following test case:

    [[1, 3, 2, 5, 7, 9, 4, 6, 8],
    [4, 9, 8, 2, 6, 1, 3, 7, 5],
    [7, 5, 6, 3, 8, 4, 2, 1, 9],
    [6, 4, 3, 1, 5, 8, 7, 9, 2],
    [5, 2, 1, 7, 9, 3, 8, 4, 6],
    [9, 8, 7, 4, 2, 6, 5, 3, 1],
    [2, 1, 4, 9, 3, 5, 6, 8, 7],
    [3, 6, 5, 8, 1, 7, 9, 2, 4],
    [8, 7, 9, 6, 4, 2, 1, 3, 5]]
    

    7th column is invalid, but your solution retrns True.

  • Custom User Avatar

    first, check that you're using the correct input to compare to the expected result: when you log something to the console, it appears above the related assertion.

    About the "issue/not an issue" part, this isn't an issue because all tests are correct. Hence this should be posted as a "question" (issue= wrong kata / question=user having trouble to solve the kata)

    Generic message below (som parts do not apply here), where you'll see your messages are still missing important informations so that we actually can help you (ex: "I got the input by printing to the console" doesn't ensure us that you're using the actual input of the failing assertion, as said above):




    Seems you're "rather new" to cw, so here are some general guidelines about the comments:

    • Issue: problem in the kata itself (description, wrong tests, wrong internal solution...)
    • Suggestions: well, I guess that part is clear
    • Question anything else that is related to you having a problem solving a kata -> that's you, currently.

    When you post issues:

    • provide ALL the useful information:
      • language
      • input
      • outputs (actual expected) when relevant
      • error message when relevant
    • check, DOUBLE check that this IS an issue, meaning that the problem is in the kata itself and not in your code. If it's in your code, post rather a question
    • if you pass this step, you still have to prove/explain what the issue is (and if you can provide fixes, it's even better)

    When you post a question: well, most of the above apply too x)

    When you post code, use proper github markdown, so that it's readable.




    cheers

  • Custom User Avatar

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

  • Custom User Avatar

    Your handling of columns is invalid. In following test case:

    132 579 468
    498 261 375
    756 384 219
    
    643 158 792
    521 793 846
    987 426 531
    
    214 935 687
    365 817 924
    879 642 135
    

    column 7 is invalid, but your solution returns True.

    Resolving as not a kata issue.

  • Custom User Avatar

    Yes I did. I got the board using print statement. On running locally, it sucessfully returns false.

  • Custom User Avatar

    Do you know the input of failing test case? Did you try to recreate it locally?

  • Custom User Avatar

    Your code fails on validation of 3x3 blocks it seems

  • Custom User Avatar

    The input to the tests are easily available by printing them thus:

        for row in board:
            print(row)
    

    Next, review the definition of blocks from the description.

  • Custom User Avatar

    See if you can find any help here.

    Not a kata issue.

  • Custom User Avatar

    python can help with the headaches:)))))

  • Custom User Avatar

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

  • Custom User Avatar

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