Question: 5 . 2 . 7 has _ won ( board: Board ) - > - > bool Returns True if the game is won, False

5.2.7 has_won(board: Board)
->
-> bool
Returns True if the game is won, False otherwise. The game is won if the goal has been achieved;
that is, every cell is filled and all rows, columns and squares on the board contain exactly one of
each digit from 1 to 9.
Example:
has_won(board_three)
False
> update_board
(
(
8
,
8
)
,
5
((8,8),5, board_three
)
)
> board_three
[[[6,8,5,1,3,2,9,4,7],[7,3,4,5,9,8,2,1,6]],
[[2,1,9,7,6,4,8,5,3],[9,2,6,8,7,1,5,3,4]],
[[8,5,1,3,4,9,6,7,2],[4,7,3,2,5,6,1,8,9]],
[[5,6,8,4,2,7,3,9,1],[3,4,2,9,1,5,7,6,8]],
[[1,9,7,6,8,3,4,2,5]]]
> has_won (board_three)
True

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!