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(4):
for c in range(3):
if getValue(r, c) == 12:
found_row = r
found_col = c
Figure 2
| column 0 | column 1 | column 2 | |
|---|---|---|---|
| row 0 | 3 | 8 | 5 |
| row 1 | 14 | 12 | 9 |
| row 2 | 12 | 2 | 7 |
| row 3 | 11 | 6 | 10 |
for r in range(4) executes exactly 4 times.found_col will be 0.found_row = r will run for every cell in the grid.getValue(r, c) and 12 is 8.c remains constant throughout the execution of the program.Practise AQA GCSE Computer Science Programming concepts with exam-style questions for GCSE Computer Science. 100 questions, matched to the AQA GCSE Computer Science (8525) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.