Past-paper question · 2016 May-June · Paper 22 · Q3(a)(iii)

Question 3(a)(iii) 2016 · May-June · Paper 22 · 3 marks

Original past-paper question for 3(A)(III)
Original past-paper question for 3(A)(III)
Reveal official mark-scheme answer Official mark-scheme answer for 3(A)(III)

Official answer for Question 3

Part (a)

(iii)

(iii)

Example VB:

[3]
✓
FOR i = 1 TO 11
✓
FOR j = 1 TO 11
✓
Puzzle(i,j) = 0
✓
NEXT j
✓
NEXT i
✓
Example Python:
✓
Puzzle = [[0 for i in range(12)] for j in range(12)]
✓
Example Pascal:
✓
FOR i := 1 TO 11 DO
✓
FOR j := 1 TO 11 DO
✓
Puzzle[i,j] := 0 ;
✓
Example C++:
✓
for (int i = 1; i <= 11; i++)
✓
for (int j = 1; j <=11; j++){
✓
Puzzle[i][j] = 0;}
✓
Mark as follows:
  • looping 11 times
  • correctly nested inner loop
  • correct assignment of array element with value for White (f.t.)

Mark scheme 9691_s16_ms_22.pdf →

Show text version of question

Question 3

Part (a)

(iii)

Question 3

A crossword puzzle is based on a grid made up of white and black squares. The white squares are

to be filled with letters to form words across the grid and down the grid.

The crossword puzzle designer provides clues for each word. Words consist of at least 2 letters.

The square where a word starts, across or down, is numbered. The numbering starts at the top left of the grid and is consecutive, row by row.

Here is an example of a crossword grid:

1 2 3 4 5 6

7 8

9 10 11

12 13 14

Question 15

16 17

18 19 Zara is given a grid design of white and black squares. This design does not yet contain numbers. Zara wants to write a program to set up a data structure for the grid data.

The data for each square will represent either:

  • a white square
  • a black square
  • a white square with a number

(iii)

Initially, all squares are to be white squares.

Write program code to initialise Puzzle.

Programming language .....................................................................................................

Code ..................................................................................................................................

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

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

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

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

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

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

[3]
Topic relevance

Why this question appears here

75% assigned-topic match · Programming

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

Keep practising this topic