AQA GCSE · Question 13 · Programming
A programmer is writing a game using a 3x3 grid. A square on the grid is referred to by a letter (A, B, C) and a number (1, 2, 3).
Figure 15 shows part of a Python program that checks the grid reference entered by a player.
The grid reference is valid if:
Figure 15
python
check = False
while check == False:
square = ""
while len(square) != 2:
square = input("Enter grid reference (eg C2): ")
square = square.upper()
Extend the program from Figure 15 so it completes the other checks needed to make sure a valid grid reference is entered.
Your extended program must:
check31 questions · hints · full answers · grading