Six original Cambridge-style questions on two-dimensional arrays and nested iteration, with mark points.
Describe a two-dimensional array.
Write a declaration for a 2D array Seats that stores a CHAR for each seat in a cinema with 12 rows of 20 seats.
DECLARE Seats : ARRAY[1:12, 1:20] ✓OF CHAR ✓State the values stored and the output.
FOR R ← 1 TO 2
FOR C ← 1 TO 3
Grid[R, C] ← R * C
NEXT C
NEXT R
OUTPUT Grid[2, 3], " ", Grid[1, 2]Marks[1:30, 1:4] stores 4 test marks for each of 30 students (one row per student). Write pseudocode that outputs each student's total mark.
FOR Student ← 1 TO 30 ✓Total ← 0 inside the outer loop, before the inner loop ✓FOR Test ← 1 TO 4 ... NEXT Test ✓Total ← Total + Marks[Student, Test] inside the inner loop ✓OUTPUT Student, Total after the inner loop, then NEXT Student ✓A student puts RowTotal ← 0 before both loops in a row-total program. Explain the effect on the output.
Using the Sales table in this lesson (3 shops by 4 weeks), state (a) Sales[1, 2] (b) the total for week 4 (c) the total for shop 2.
Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.