Past-paper question · 2015 May-June · Paper 21 · Q3(d)

Question 3(d) 2015 · May-June · Paper 21 · 5 marks

Question 3

Part (d)

Question 3

A board game is designed for two players, O and X.

At the beginning, all cells of a 3 x 3 grid are empty.

The players take turns in placing their marker in an empty cell of the grid; player O always starts.

The game ends when one player completes a row, column or diagonal or the grid is full.

Here is one example after three turns:

O

O X

Ali wants to write a program to play the game.

Part (d)

Write the pseudocode required for the procedure SwapPlayer:

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

..............................................................................................................................................

[5]

Question 10

Reveal official mark-scheme answer Official mark-scheme answer for 3(D)

Official answer for Question 3

Part (d)

Part (d)

(i)

✓
x
✓
y
✓
z
✓
w
✓
OUTPUT
✓
"E"

Question 69

Question 72

✓
"H"
✓
"H"
✓
"B"

Question 66

Question 69

✓
"E"
✓
"E"
✓
"I"

Question 73

Question 76

✓
"L"
✓
"L"
✓
"M"

Question 77

Question 80

✓
"P"
✓
"P"
✓
1 mark per column (first three) – 1 mark last two columns
[4]

Mark scheme 9691_s15_ms_21.pdf →

Topic relevance

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_s15_qp_21.pdf

Keep practising this topic