Creating a function estimate_ index, which tells where the number on the board is so if I have a 4x4 board, then the numbers [[2, false], [3, false], [4, false], [1, false] [same row as above [above] as the above line ] [/ Code> So, first I need to change it to a list like below [[0,1,2,3], [4] , 5,6,7], [8 9, 10, 11], [12,13,14,15]] So estimate_index (board, 3) [0,3 ] Back Should meaning that No. 3 is located at 0 th row; The third column should also be returned to the estimate_index (board, 14) [3,2] The hard part is working for 2x4 vs a 4x2 matrix etc. My code is DFF estimates (board, estimation) for count = 0 I in board: i in j: board [i] [j] == [count] in the board for count = 1: for b: a: If b == estimate: return [a, b] But when I try the examples written above, even then I can not find any ?? Start with: board = [[[5, False], [5, false], [3, false], [4, false]] [[1, false] [0, false], [6, false], [7, false]], [[2] , [False], [2, false], [3, fals...
Comments
Post a Comment