An automated deep-sea research probe measures water salinity levels across different depths and horizontal offsets using a 2D coordinate grid of rows and columns. A marine biologist wants to check if the salinity levels in the deepest segment (row 3) are strictly increasing from left to right to confirm the presence of a hydrothermal updraft.
Write a Python program to:
You must use the getSalinity subroutine described below in your Python code.
| Subroutine | Purpose |
|---|---|
getSalinity(row, column) | Returns the salinity level (as an integer) of the water positioned at (row, column) |
| column 0 | column 1 | column 2 | |
|---|---|---|---|
| row 3 | 35 | 32 | 38 |
| row 4 | 30 | 31 | 32 |
For Example A, the program should display No Updraft (because 32 is not greater than 35).
| column 0 | column 1 | column 2 | |
|---|---|---|---|
| row 3 | 34 | 36 | 39 |
| row 4 | 31 | 32 | 33 |
For Example B, the program should display Updraft (since 34 < 36 < 39).
131 exam-style questions on AQA GCSE Computer Science Structured programming and subroutines (procedures and functions). Each one has a worked solution and a mark scheme showing where the marks go.