AQA A-Level Computer Science AS Paper 1, June 2025: Question 14
4 marks Β· Easy difficulty Β· Short Answer
Describe the conditions that cause the game to end and give pirate actions that increase and decrease the score based on the skeleton program.
Practise this questionQuestion
Question text
14 There are three conditions that cause the game to end.
One condition is that the score goes below 0.
14.1 Describe the other two conditions that cause the game to end.
[2 marks]
The score can increase and decrease during the game.
14.2 Give one pirate action that increases the score.
[1 mark]
14.3 Give one pirate action that decreases the score.
[1 mark]
Mark scheme
Show the mark scheme
14 1 2 marks for AO2 (analyse) 2
User presses Enter (without entering any other value first) when asked for pirate action;
The pirate finds the treasure;
14 2 Mark is for AO2 (analyse) 1
Finding a coconut/treasure;
14 3 Mark is for AO2 (analyse) 1
Pirate walking/digging;
How to answer it
Skeleton Code Analysis: Pirate Game Mechanics & Termination
This question assesses your familiarity with the AQA Skeleton Program (AO2 β Application/Analysis). Specifically, it examines:
- Tracing program loop termination conditions (Boolean game loop logic).
- Understanding event-driven user input (graceful exit via empty keystroke).
- Tracking variable state changes (actions that increment vs decrement the Score variable).
Game Termination Conditions
2 Marks (AO2)
The prompt states: "There are three conditions that cause the game to end. One condition is that the score goes below 0. Describe the other two conditions that cause the game to end."
β Correct Answers (1 mark each, max 2)
- Condition 1: The user presses Enter (without entering any other value first) when prompted for a pirate action.
- Condition 2: The pirate finds the treasure / lands on the treasure chest cell.
π‘ Key Knowledge
The main game runs inside a condition-controlled while loop. In the code, the loop terminates if:
- Score < 0 (given in the question stem)
- FoundTreasure == True (objective achieved)
- Action == "" or len(Action) == 0 (user quits by submitting an empty string)
π§ Exam Technique
Always inspect the main game loop condition in the PlayGame() subroutine. State the termination condition in terms of game behaviour or direct player action. Notice that the prompt asks for "the other two conditions"βensure you do not repeat the score falling below 0.
β Common Errors
- Writing simply "User quits" or "User enters Q" without describing the exact trigger: pressing Enter on an empty line.
- Stating generic game-over rules not present in this specific code (e.g., "Time runs out" or "Pirate falls off the island").
β’ 1 mark for user pressing Enter without entering any character first.
β’ 1 mark for the pirate discovering/finding the treasure.
Actions That Increase Score
1 Mark (AO2)
"Give one pirate action that increases the score."
β Correct Answers (Any one)
- Finding a coconut.
- Finding the treasure.
π‘ Key Knowledge
Score increases occur upon encountering reward items on the grid:
- A coconut adds positive points (energy/bonus) to the player's tally.
- Uncovering the hidden chest provides the primary score reward.
π§ Exam Technique
Only provide one distinct action. If you provide multiple contradictory answers, examiners apply a list principle and will not award the mark if an incorrect action is included.
β Common Errors
- Confusing basic navigation with scoring events (e.g. thinking walking across free sand earns points).
- Vague answers like "moving around" or "playing well".
Actions That Decrease Score
1 Mark (AO2)
"Give one pirate action that decreases the score."
β Correct Answers (Any one)
- Pirate walking (taking a step / movement action).
- Pirate digging (attempting to dig up a site).
π‘ Key Knowledge
Actions expend pirate stamina/resources, modelled via score decrements:
- Each move made ( M command) reduces the score.
- Each dig attempted ( D command) incurs a penalty/cost.
π§ Exam Technique
Look at the subroutine handling pirate turns (e.g., MakeMove() or Dig() ). Look specifically for statements with arithmetic assignments like Score = Score - Cost .
β Common Errors
- Specifying consequences instead of actions (e.g., saying "losing energy" instead of the action that caused it: "walking" or "digging").
- Stating actions that trigger an automatic loss rather than a numerical deduction.
Topics
4.1 Fundamentals of programming Β· 4.4 Theory of computation Β· 4.1.1 Programming Β· 4.4.1 Abstraction and automation
Question and mark scheme from the AQA A-Level Computer Science examination, AS Paper 1, June 2025. QuestionVault is an independent revision resource; questions remain the copyright of the awarding body.