Past-paper question · 2015 May-June · Paper 22 · Q4(c)(iii)

Question 4(c)(iii) 2015 · May-June · Paper 22 · 5 marks

Original past-paper question for 4(C)(III)
Original past-paper question for 4(C)(III)
Original past-paper question for 4(C)(III)
Original past-paper question for 4(C)(III)
Reveal official mark-scheme answer

The answer for this question is in the official mark scheme: open the mark scheme.

Mark scheme 9691_s15_ms_22.pdf →

Show text version of question

Question 4

Part (c)

(iii)

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

(iii)

Give the line number of a statement which shows: Assignment ....................................................................................................................... Selection ........................................................................................................................... Iteration ............................................................................................................................. a Function call ................................................................................................................... a Procedure call ................................................................................................................

[5]

Question 9

Topic relevance

Why this question appears here

99% 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_22.pdf

Keep practising this topic