Question 4(c)(ii) 2015 · May-June · Paper 21 · 1 mark
Reveal official mark-scheme answer
The answer for this question is in the official mark scheme: open the mark scheme.
Show text version of question
Question 4
Part (c)
(ii)
Part (c)
Ali uses the top-down design approach for his overall program solution.
His design is as follows: 01 GameEnd ← FALSE 02 CurrentPlayer ← 'O' 03 CALL DisplayGrid() 04 05 REPEAT 06 CALL PlayerTakesTurn(CurrentPlayer) 07 CALL DisplayGrid() 08 IF HasPlayerWon() = TRUE 09 THEN
Question 10
GameEnd ← TRUE
Question 11
OUTPUT "Player", CurrentPlayer, "has won"
Question 12
ELSE
Question 13
IF GridFull() = TRUE
Question 14
THEN
Question 15
GameEnd ← TRUE
Question 16
OUTPUT "Draw"
Question 17
ELSE
Question 18
CALL SwapPlayer(CurrentPlayer)
Question 19
ENDIF
Question 20
ENDIF
Question 21
UNTIL GameEnd = TRUE
(ii)
State one benefit of top-down design. ........................................................................................................................................... ......................................................................................................................................
Why this question appears here
92% assigned-topic match · Programming › Constructs
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
