AQA GCSE Computer Science Paper 1 (1B), June 2025: Question 10
8 marks · Medium difficulty · Programming
Complete pseudo-code to instantiate and access fields of a record, and write a program to find the minimum value in an array.
Practise this questionQuestion
Question text
10 A programmer is writing an algorithm, using pseudo-code, to store the results of
running events.
The programmer uses a record data structure.
Each record stores:
• the name of the running event
• the runner’s number
• the time in seconds for that runner in that event.
Figure 10 shows the record structure.
Figure 10
RECORD Runner
event : String
runnerNumber : Integer
time : Real
ENDRECORD
10.1 Figure 11 shows pseudo-code used to create two records using the structure in
Figure 10.
Figure 11
race1 Runner('400 m', 23, 51.35)
race2 Runner('400 m', 14, 63.26)
Complete the line of pseudo-code to create a new record that contains the following
data:
event runnerNumber time
200 m 10 32.59
[1 mark]
race3
10.2 Complete the line of pseudo-code needed to output the time of race2
[1 mark]
OUTPUT race2 27
10.3 The programmer wants to find the fastest time for a particular running event.
The times for all the runners in the event are stored in an array of real numbers
called times
Write a Python program to find the fastest time.
Your program must:
*26*•find the smallest value in the array (ie the fastest time)
• output the smallest value
• work with any size of array.
For example, if times contains 28.5, 26.3 and 30.0, the output should be 26.3
The program you write must not use any built-in routines to find the smallest
value in an array or to sort the array into an order.
You do not need to write code to create the array times
You should use indentation as appropriate, meaningful variable name(s) and
Python syntax in your answer.
The answer grid below contains vertical lines to help you indent your code
accurately.
[6 marks]
Mark scheme
Show the mark scheme
Total
Question Part Marking guidance
marks
10 1 Mark is for AO2 (apply) 1
Runner('200 m', 10, 32.59);
I. Case
R. if quotes, commas or parentheses missing
Total
Question Part Marking guidance
marks
10 2 Mark is for AO2 (apply) 1
.time;
I. Case
R. if period is missingMARKSCHEME – COMPUTER SCIENCE – – JUNE 2025
Total
Question Part Marking guidance
marks
10 3 1 mark for AO3 (design), 5 marks for AO3 (program) 6
Program Design
Note that AO3 (design) marks are for selecting appropriate techniques to
use to solve the problem, so should be credited whether the syntax of
programming language statements is correct or not and regardless of
whether the solution works.
Mark A for attempting to calculate the length of the array times;
Program Logic
Mark B for initialising a variable to an appropriate numeric value to store the
fastest time or the index to the fastest time;
Mark C for using a loop to correctly iterate through an array of any length;
Mark D for correctly checking values (on at least 2 occasions) in the times
array are smaller than the current fastest time (even if the indexing is
incorrect);
Mark E correctly store the current fastest time/position of the fastest time for
each iteration (indexing must be correct);
Mark F for outputting the fastest time from a variable once, in an
appropriate place;
Note to Examiners
If used built in routines to find the smallest value in an array or to sort the
array then do not award marks D, E
I. Case
I. Gaps/spaces throughout the code, except where to do so would explicitly
alter the logic of the code in a way that makes it incorrect.
Maximum 5 marks if any errors in code.
Note to examiners
In C#/VB.NET examples, explicit variable declarations are not shown. Refer
to the specific language type issues section of the appropriate Marking
Guidance document. Any correct variable declarations in student answers
should be accepted.MARKSCHEME – COMPUTER SCIENCE – – JUNE 2025
VB.NET Example 1 (fully correct)
All design marks are achieved (Mark A)
length = times.Length Part of C
best = times(0) B, Part of D
For i = 1 to length - 1 Part of C
If times(i) < best Then Part of D
best = times(i) E
End If
Next
Console.WriteLine(best) F
A. Write in place of WriteLine;
I. missing Console.
VB.NET Example 2 (fully correct)
All design marks are achieved (Mark A)
best = times(0) B, Part of D
For Each time In times C
If time < best Then Part of D
best = time E
End If
Next
Console.WriteLine(best) F
A. Write in place of WriteLine;
I. missing Console.
How to answer it
Record Data Structures & Linear Minimum Search
This question assesses practical understanding of user-defined record structures in pseudo-code (creation and dot-notation field access) and algorithmic problem solving in Python to find the minimum value in an array without using built-in methods like min() or sort() .
Instantiating a Record
Completing pseudo-code to assign new record data
✅ Correct Answer
Runner('200 m', 10, 32.59)
The prompt provides race3 ← , so only the record call and its arguments were required.
💡 Key Knowledge
- A record groups related items of different data types under one identifier.
- Match the schema from Figure 10: event: String , runnerNumber: Integer , time: Real .
- Strings must always be enclosed in quotation marks (single or double).
🧠 Exam Technique
Look at the examples already given in Figure 11! The examiner provided the exact syntax used for race1 and race2 :
race1 ← Runner('400 m', 23, 51.35)Mirror the pattern precisely with the new data given in the table.
❌ Common Errors
- Missing quotation marks: Writing 200 m without quotes causes a mark loss.
- Missing commas or parentheses: Punctuation must be syntactically valid.
- Note: Letter casing was ignored by examiners, but correct syntax was strictly required.
Accessing Record Fields
Using dot-notation to select a specific attribute
✅ Correct Answer
.time
Full resulting line: OUTPUT race2.time
💡 Key Knowledge
In pseudo-code and most high-level languages, individual fields within a record are accessed using the dot operator ( . ):
recordIdentifier.fieldIdentifier🧠 Exam Technique
Pay close attention to where the dotted line starts. The question gives:
OUTPUT race2___________ .
Because race2 is already printed on the page, your answer must supply the dot: .time .
❌ Common Errors
- Omitting the dot: Writing just time or ['time'] . A period was strictly required.
- Referencing the wrong field: E.g., writing .runnerNumber instead of .time .
Finding the Minimum in an Array
Writing a Python algorithm without built-in helper functions
✅ Model Python Solution
# Approach 1: Iterating by index fastest = times[0] for i in range(1, len(times)): if times[i] < fastest: fastest = times[i] print(fastest) # Alternative Approach 2: Direct item iteration (equally valid!) fastest = times[0] for t in times: if t < fastest: fastest = t print(fastest)📐 How the Algorithm Works (Step-by-Step Trace)
- Initialise: Set fastest = times[0] (in example: 28.5 ).
- Loop element 2: Compare 26.3 < 28.5 → True! Update fastest = 26.3 .
- Loop element 3: Compare 30.0 < 26.3 → False! No change.
- Terminate loop & Output: Loop finishes; print 26.3 once.
🧠 Mark Breakdown (6 Marks Total)
- Mark A (AO3 Design): Attempting to calculate array length / handle any length ( len(times) or iterating for t in times: ).
- Mark B: Initialising fastest to an appropriate value (e.g. times[0] ).
- Mark C: Correct loop header iterating through array of any length.
- Mark D: Conditional check if value is less than current fastest ( < fastest ).
- Mark E: Updating fastest value when condition is true ( fastest = ... ).
- Mark F: Outputting fastest once outside the loop.
❌ Critical Traps to Avoid
- Using forbidden built-ins: Using min(times) or times.sort() forfeits Marks D and E automatically!
- Initialising to 0: If you write fastest = 0 , no race time will ever be smaller than 0, meaning the algorithm fails completely. Always initialise to times[0] .
- Printing inside the loop: Putting print() inside the loop prints a value on every pass. It must be un-indented so it runs only once.
- Hardcoding array length: Writing range(3) fails Mark A and Mark C because the specification states the code must "work with any size of array".
Topics
3.2 Programming · 3.1 Fundamentals of algorithms · 3.2.2 Programming concepts · 3.2.4 Relational operations in a programming language · 3.2.6 Data structures · 3.2.7 Input/output
Question and mark scheme from the AQA GCSE Computer Science examination, Paper 1 (1B), June 2025. QuestionVault is an independent revision resource; questions remain the copyright of the awarding body.