A marine research agency is operating an autonomous deep-sea drone navigating through depth sectors of an ocean trench represented as an array.
trench array| Index | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|---|
| Content | V | V |
trench array.target_depth).1, 2, 3, or 4.
'V':
"System overheat! Returning to surface." is displayed.0.depth = 0
target_depth = len(trench) - 1
while depth < target_depth:
Extend the program from Figure 3 so that the navigation simulation works as described in the rules in Figure 2.
When writing your program, you should assume:
trench.'V' characters in trench can vary.'V' characters in trench can vary.'V' characters have already been initialized in the array.trench array can be of any length greater than 1.You should use meaningful variable names and correct programming syntax in your answer.
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.