AQA A-Level Computer Science Paper 1, June 2025: Question 11
12 marks · Hard difficulty · Programming
Modify the Skeleton Program by writing a new subroutine DisplayTargetMultiples to identify and display values appearing more than once in the Targets list, updating DisplayState to call it, and providing a test screenshot.
Practise this questionQuestion
Question text
11 This question extends the Skeleton Program by telling the player all the values that
appear more than once in the list of targets.
Before displaying the current score, the program should display an additional list
containing all the values that appear more than once in the list of targets. In this
additional list, each value should only be displayed once.
What you need to do
Task 1
Create a new subroutine called DisplayTargetMultiples that will display all
the values that appear more than once in the targets shown to the player.
Task 2
Modify the DisplayState subroutine so that it calls the subroutine
DisplayTargetMultiples immediately before the current score is displayed.
Task 3
Test that the changes you have made work:
• run the Skeleton Program
• select the training game.
Evidence that you need to provide
Include the following evidence in your Electronic Answer Document.
11.1 Your PROGRAM SOURCE CODE for the new subroutine
DisplayTargetMultiples and the amended subroutine DisplayState.
[11 marks]
11.2 SCREEN CAPTURE(S) showing the requested test.
[1 mark]
Mark scheme
Show the mark scheme
Question Marks
11 1 All marks for AO3 (programming) 11
Mark points 1 to 9 refer to the new subroutine DisplayTargetMultiples.
Mark points 10 to 11 refer to DisplayState.
1. Create a new subroutine called DisplayTargetMultiples; R. other
names for subroutine I. case and minor typos
2. Selection structure that compares two values in Targets;
3. Checks that one (or both) of the two compared values are not –1;
4. Checks if the value has not already been included in the list of duplicates;
5. Adds value that (their code) recognises as appearing multiple times to a list; A.
equivalent
6. Iteration structure that selects each value in Targets;
7. Iteration structure that selects all other values in Targets; A. all values if there
is a mechanism to check that the two values are not in the same position in
Targets
8. Displays one duplicate value found; R. if a non-duplicate number is also
displayed I. -1 being displayed
9. Displays all duplicate numbers found; R. if a duplicate number is displayed
more than once I. -1 being displayed
10. Call the new subroutine;
11. Call to new subroutine in correct place in DisplayState;
Alternative solution
4. Checks that a count of the number of occurences for a number is greater than 1;
6. Iteration structure that selects each number between 0 and the maximum
number in Targets / the maximum target number that could be generated;
7. Counts how often that number appears in Targets;
Max 10 marks if code contains errors–A-LEVEL COMPUTER SCIENCE – –
11 2 Mark is for AO3 (evaluate) 1
**** SCREEN CAPTURE ****
Must match code from 11.1.
Code for 11.1 must be sensible.
Screen capture(s) showing 23, 34, 119 are the targets that appear multiple times;
I. order of 23, 34, 119
How to answer it
Duplicate Target Values Display ( DisplayTargetMultiples )
What this question tests
This question assesses your ability to modify an existing Skeleton Program (AO3 Design & Programming). Key skills include: writing a brand-new subroutine to identify duplicate items in an array/list, avoiding sentinel values ( -1 ), preventing duplicate output entries, calling subroutines correctly with the appropriate scope/arguments, and capturing accurate test evidence.
Part 11.1 — Program Source Code
Creating DisplayTargetMultiples and Updating DisplayState (11 Marks)
💡 Key Knowledge: Algorithmic Logic
- The Array / List: Targets holds the target integers. Unfilled or cleared slots contain the sentinel value -1 , which must be ignored.
- Finding Multiples: You must check every pair of positions (i, j) where i ≠ j (or use frequency counting with count() ).
- Deduplication: Once an item is identified as appearing multiple times, check whether it is already in your duplicates collection (e.g. if target not in duplicates ) before adding or displaying it.
🧠 Exam Technique & Mark Scheme Rules
- Exact Subroutine Name: Must be named DisplayTargetMultiples (MP1). Case and minor typos are tolerated, but stick strictly to the prompt.
- Positioning Call (MP11): In DisplayState , place the call immediately before the line displaying the current score.
- Maximum Cap: A cap of 10/11 marks applies if the code contains any syntax or semantic errors.
✅ Model Implementation (Python Example)
Step 1: Write the new subroutine (using a tracking list approach):
Alternative Python implementation (using count):
Step 2: Update DisplayState subroutine:
• [MP1] Subroutine named DisplayTargetMultiples created.
• [MP2] Selection structure comparing two values in Targets .
• [MP3] Checks that compared values are not -1 .
• [MP4] Checks if value is not already added to duplicates list.
• [MP5] Appends/adds the duplicate value to a list or equivalent structure.
• [MP6] Outer iteration selecting each value in Targets .
• [MP7] Inner iteration selecting other values (or verifying distinct indices).
• [MP8] Displays at least one duplicate value (reject if non-duplicates are printed).
• [MP9] Displays all duplicates found without printing any duplicate twice.
• [MP10] Subroutine is called.
• [MP11] Subroutine is called in the exact correct position in DisplayState .
❌ Common Traps & Student Misconceptions
- Forgetting the sentinel value: Many candidates forget that -1 represents empty slots. If multiple targets have been removed or left empty, -1 will be detected as a duplicate and printed.
- Printing duplicates multiple times: If a target appears 3 times (e.g., 23 ), a nested loop can match it multiple times. Without a check like if value not in Duplicates , 23 will be output multiple times, forfeiting MP9.
- Self-comparison bug: Starting the inner loop from 0 without checking i != j causes every single number to match with itself, falsely identifying every element as a duplicate.
- Wrong call location: Placing the call after printing the score or in the main game loop rather than inside DisplayState loses MP11.
Part 11.2 — Screen Capture Test
Executing the Training Game Test (1 Mark)
🧠 Requirements for Full Marks
- Mode: Select the training game ( y when prompted).
- Values Displayed: Must clearly show duplicate targets: 23 , 34 , and 119 .
- Order: The order in which 23 , 34 , and 119 are printed does not matter (mark scheme explicitly allows: "I. order of 23, 34, 119").
- Code Consistency: The screenshot output must be generated by the code submitted for 11.1.
📐 Expected Screen Output Layout
Notice how 23 appears three times, 34 appears twice, and 119 appears twice in the training targets. Each is printed exactly once right above Current score: 0 .
❌ Reasons for Zero Marks on 11.2
- Selecting a random game instead of the training game (the targets will not match the required test set).
- Cropping the screenshot so that the terminal input or the line above/below is missing, preventing verification of the placement.
- Submitting hardcoded outputs that do not match the program logic in 11.1.
Topics
4.1 Fundamentals of programming · 4.2 Fundamentals of data structures · 4.1.1 Programming · 4.2.1 Data structures and abstract data types
Question and mark scheme from the AQA A-Level Computer Science examination, Paper 1, June 2025. QuestionVault is an independent revision resource; questions remain the copyright of the awarding body.