A drone scans a 4×4 4 \times 4\,4×4 grid of a volcanic field to record ground temperatures in ∘C^\circ\text{C}∘C. The recorded temperature readings are represented in Figure 2.
criticalRow = -1
criticalCol = -1
for r in range(0, 4):
for c in range(0, 4):
if getReading(r, c) == 52:
criticalRow = r
criticalCol = c
| Column 0 | Column 1 | Column 2 | Column 3 | |
|---|---|---|---|---|
| Row 0 | 18 | 24 | 31 | 29 |
| Row 1 | 22 | 35 | 40 | 28 |
| Row 2 | 15 | 27 | 52 | 33 |
| Row 3 | 21 | 19 | 30 | 26 |
State the purpose of the program in Figure 1.
298 exam-style questions on AQA GCSE Computer Science Programming concepts. Each one has a worked solution and a mark scheme showing where the marks go.