An autonomous marine research buoy network uses a grid coordinate system to track its deployment stations. The station layout is a 3x5 grid as shown in Figure 1.
| X | Y | Z | |
|---|---|---|---|
| 5 | |||
| 6 | [Buoy] | ||
| 7 | |||
| 8 | |||
| 9 |
valid = False
while valid == False:
ref = ""
while len(ref) != 2:
ref = input("Enter buoy station reference (e.g. Y6): ")
ref = ref.upper()
Extend the Python program in Figure 2 so that it completes the validation checks and matches the coordinate layout in Figure 1.
Your extended program must:
validvalid to True if both checks are metYou should write Python code or precise pseudocode 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.