Write a Python program to:
- check that in the middle column (column 1):
- the second row value (row 1) is exactly 5 more than the first row value (row 0)
- the third row value (row 2) is exactly 5 more than the second row value (row 1)
- display Verified when the column meets both conditions above
- display Rejected when the column does not meet both conditions above.
For example:
- for the grid in Figure 1, the program would display Rejected
- for the grid in Figure 2, the program would display Verified
You must use the getValue function in your Python code.
You should use meaningful variable name(s) and Python syntax in your answer.
| Subroutine | Purpose |
|---|
getValue(row, column) | Returns the integer value at grid position (row, column) |
| | Column 0 | Column 1 | Column 2 |
|---|
| Row | 0 | 3 | 4 | 8 |
| 1 | 6 | 9 | 10 |
| 2 | 9 | 12 | 15 |
| | Column 0 | Column 1 | Column 2 |
|---|
| Row | 0 | 3 | 2 | 8 |
| 1 | 6 | 7 | 10 |
| 2 | 9 | 12 | 15 |