Question 28
For an n x n chess board, we can label each square as an xy-coordinate pair.
We will use zero-based indexing, namely counting starts with 0 instead of 1.
The function checker_coord(n) returns a list of all coordinates in the board.
Sample output:
>>> print(checker_coord(2))
[(0, 0), (1, 0), (0, 1), (1, 1)]
>>> print(checker_coord(3))
[(0, 0), (1, 0), (2, 0), (0, 1), (1, 1), (2, 1), (0, 2), (1, 2), (2, 2)]
Complete the code below by filling in the blanks. The order of each item in the output list must match that in the sample output. [5 marks]