Question 8(b) 2016 · May-June · Paper 11 · 2 marks
Reveal official mark-scheme answer
Official answer for Question 8
Part (b)
Part (b)
Description of the algorithm (or accept an algorithm):
Show text version of question
Question 8
Part (b)
Question 8
Two players, X and O, play a game. The players take turns to place either ‘X’ or ‘O’ in any one of
the empty squares on the board. The board shows a current game in play.
1 2 3 4 5 6 7 1 X O 2 X 3 O
Question 4
5 O 6 X O O X 7 O X X X O
Either player (X or O) wins when there are four ‘X’s or four ‘O’s next to each other:
- in a row, or
- in a column, or
- in a diagonal line
The programmer stores the mark ‘X’ as the value 1 and the mark ‘O’ as the value 2.
The programmer uses a 2-dimensional array, Board[1 : 7, 1 : 7] , to store the current value in each square.
Part (b)
Describe how the programmer could initialise the array Board for the start of the game.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Why this question appears here
71% assigned-topic match · Hardware › Logic gates and logic circuits
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_s16_qp_11.pdf
