Which two of the following statements about the Python program in Figure 1 are true when it is executed with the grid shown in Figure 2?
Select two options.
Figure 1
for r in range(3):
for c in range(3):
if getCell(r, c) == 9:
target_row = r
target_col = c
Figure 2
| column 0 | column 1 | column 2 | |
|---|---|---|---|
| row 0 | 1 | 4 | 3 |
| row 1 | 5 | 9 | 2 |
| row 2 | 8 | 7 | 6 |
for r in range(3) runs exactly 3 times.target_col will be 1.target_row = r will run for every cell in the grid.getCell(r, c) and 9 is 6.c does not change its value during execution.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.