AQA A-Level Computer Science AS Paper 1, June 2025: Question 11
2 marks · Medium difficulty · Short Answer
Explain why it is necessary to check that the value stored at the pirate's position is equal to PIRATES before updating it to SAND in the Move subroutine.
Practise this questionQuestion
Question text
11 This question refers to the subroutine Move.
Explain why it is necessary to check that the value stored at the pirate’s position is
equal to the value represented by PIRATES before changing the location to
represent SAND.
[2 marks]
Mark scheme
Show the mark scheme
11 2 marks for AO2 (analyse) 2
Without this test the X would be overwritten / replaced by sand;
… after the pirate’s/player’s (first) move; A. … at the beginning of the game
Max 2
How to answer it
Subroutine Analysis: Preserving Grid Symbols in Move
What this question tests
This question evaluates your ability to trace and critically analyse logic within the pre-release Skeleton Program. Specifically, it tests your understanding of:
- The boundary and edge-case behaviour of the Move subroutine during state changes.
- How the starting/initial state (where the pirate starts on 'X' ) interacts with subsequent grid updates.
- Why conditional guards are essential before overwriting array/grid elements with background tiles ( SAND ).
Question 11 Breakdown
Explaining the conditional check before overwriting with SAND
✅ Model Answer (Full 2 Marks)
A full-mark answer requires two connected parts:
- The consequence: Without this check, the symbol 'X' (the starting location marker) would be permanently overwritten or replaced by SAND . [1 Mark]
- The specific timing/condition: This would occur on the pirate's/player's first move (or at the very beginning of the game). [1 Mark]
• 1 Mark: "Without this test the X would be overwritten / replaced by sand"
• 1 Mark: "... after the pirate’s/player’s (first) move" (Also accept: "... at the beginning of the game")
💡 Key Program Mechanics
- Initial State: At the start of the game, the pirate spawns on the tile marked 'X' rather than regular SAND .
- Routine Logic: When a pirate departs a square, the game leaves behind what was underneath. In normal turns, a pirate is standing on PIRATES , which converts back to SAND .
- The Guard Check: Checking Board[Row][Col] == PIRATES ensures that if the tile contains 'X' , it is not replaced by sand, preserving the start mark on the board.
🧠 Exam Technique & Examiner Insight
- Identify the exception: In 2-mark AO2 code explanation questions, one mark is almost always for what gets corrupted/changed, and the second mark is for when or under what circumstance it happens.
- Name the exact symbol: Top-scoring candidates explicitly named 'X' . Vague answers referring only to "other characters" or "the square" lost the first mark.
- Identify the trigger point: Stating only that "it would overwrite the board" is too generic. You must point out that this is an issue unique to the first move from the starting point.
❌ Common Pitfalls to Avoid
- Being too generic: Saying "so sand isn't placed everywhere" or "to prevent replacing items" without identifying 'X' scores 0 marks.
- Omitting the timing: Mentioning that 'X' gets overwritten but forgetting to specify that this happens on the first move / start of the game caps your response at 1/2 marks.
- Confusing PIRATES with treasure: Thinking this check preserves chest positions or prevents moving into obstacles rather than tracing the previous tile vacated by the moving pirate.
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.