An engineer is diagnosing a microchip's 4×4 4 \times 4\,4×4 temperature sensor grid. The Python script in Figure 1 is used to inspect the thermal map shown in Figure 2.
Figure 1
for r in range(4):
for c in range(4):
if get_reading(r, c) == "H":
hotspot_row = r
hotspot_col = c
Figure 2
| column 0 | column 1 | column 2 | column 3 | |
|---|---|---|---|---|
| row 0 | "Normal" | "Normal" | "Cool" | "Normal" |
| row 1 | "Cool" | "Normal" | "Normal" | "Normal" |
| row 2 | "Normal" | "Normal" | "Normal" | "H" |
| row 3 | "Normal" | "Cool" | "Normal" | "Normal" |
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.