Question: need help putting this into python def better board(size, zeros on diag 1, zeros on diag 2): This will be a slightly nicer game board
need help putting this into python

def better board(size, zeros on diag 1, zeros on diag 2): This will be a slightly nicer game board than simple_board can produce. This board has straight edges around the outside (except the corners) and allows you to fill one (or both) diagonals with zeros. The first parameter is size (like simple_board(), the second parameter indicates if the diagonal from the top left to the bottom right should be filled with Os, the third parameters is for the top right to bottom left diagonal Size 2 Board No Diag. Size 3 Board, 1st Diag.Size 4 Board, 2nd Diag. Size 5 Board, Both Diag I I l0l I l0l I l0l I 1 101 l ll llI I I lel II ol lo lel I lel II Return value a string of the game board Assumptions o size will be a positive integer o zeros_on_diag_1 and zeros_ on_diag_2 will be booleans Notes: o o Hint 1: This will be much easier if you use nested loops. Hint 2: Work on the board without diagonals first. Once that is working, try doing the first diagonal (it's easier than the second one). Once that is working, try the second diagonal. Make sure to return a string, not print a string o def better board(size, zeros on diag 1, zeros on diag 2): This will be a slightly nicer game board than simple_board can produce. This board has straight edges around the outside (except the corners) and allows you to fill one (or both) diagonals with zeros. The first parameter is size (like simple_board(), the second parameter indicates if the diagonal from the top left to the bottom right should be filled with Os, the third parameters is for the top right to bottom left diagonal Size 2 Board No Diag. Size 3 Board, 1st Diag.Size 4 Board, 2nd Diag. Size 5 Board, Both Diag I I l0l I l0l I l0l I 1 101 l ll llI I I lel II ol lo lel I lel II Return value a string of the game board Assumptions o size will be a positive integer o zeros_on_diag_1 and zeros_ on_diag_2 will be booleans Notes: o o Hint 1: This will be much easier if you use nested loops. Hint 2: Work on the board without diagonals first. Once that is working, try doing the first diagonal (it's easier than the second one). Once that is working, try the second diagonal. Make sure to return a string, not print a string o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
