AQA GCSE Computer Science June 2025 Paper 1, Question 10: the fastest time
AQA 8525 June 2025 Paper 1, Question 10: create a Runner record, output one of its fields, and write a Python program that finds the smallest value in an array of any size without min or sort. A model answer, the six marks explained, and the program to run.
Question 10 of the AQA GCSE Computer Science Paper 1 sat on 12 May 2025 (8525/1B, the Python paper) has two one mark parts on records, and then a 6 mark program: find the smallest number in an array, without using anything built in that does it for you.
We do not copy the exam paper here. Open it beside this page: AQA June 2025 Paper 1B question paper (PDF). When you have finished, check the mark scheme too.
Parts 1 and 2: the record
A record called Runner has three fields: event (a string), runnerNumber (an integer) and time (a real). The paper shows two being made, such as race1 ← Runner('400 m', 23, 51.35).
10.1 Create a record for the 200 m, runner 10, 32.59 seconds:
race3 ← Runner('200 m', 10, 32.59)
Same order as the fields. Quotes round the string, none round the numbers. Missing quotes, commas or brackets lose the mark.
10.2 Output the time of race2:
OUTPUT race2.time
Record, dot, field. The mark scheme rejects the answer if the dot is missing.
Part 3: the question in short
The times of all the runners in an event are in an array of real numbers called times. Write a Python program that finds the smallest value (the fastest time) and outputs it. It must work for an array of any size, and must not use built-in routines that find the smallest value or sort the array. So no min(times) and no times.sort().
A model answer
fastest = times[0]
for i in range(len(times)):
if times[i] < fastest:
fastest = times[i]
print(fastest)
The pattern is smallest so far. Start by assuming the first time is the fastest. Look at every time. Whenever one is smaller, it becomes the new fastest. After the loop, the variable holds the answer.
Where the six marks are
- trying to find the length of the array (a design mark: that is what
len(times)earns); - a variable that starts at a sensible value;
- a loop that goes through an array of any length;
- comparing values in the array with the fastest so far;
- storing the new fastest time correctly on each pass;
- outputting the fastest time once, after the loop.
Any error caps it at 5. Using min or sort loses the two marks for comparing and storing.
Where the marks are lost
- Starting at 0.
fastest = 0means no real time is ever smaller, so the answer is always 0. Start withtimes[0], or with a number bigger than any possible time. range(3). The example has three times, and the question says any size. Uselen(times).>for<. That finds the slowest.- Printing inside the loop. The answer is only known at the end.
- Creating the array. The question says you do not need to. It will not lose marks, and it will lose time.
Run it
The program on the array from the paper's example, with a print on every pass to show the fastest so far. Change the times and add more.
The program
from bugbot import *
connect()
times = [28.5, 26.3, 30.0]
fastest = times[0]
for i in range(len(times)):
if times[i] < fastest:
fastest = times[i]
print("looked at", times[i], "fastest so far", fastest)
print(fastest)
forward(60, distance=fastest)
Questions
What is the answer to AQA GCSE Computer Science 2025 Paper 1 Question 10.3?
Set fastest to times[0]. Loop i over range(len(times)). If times[i] is less than fastest, set fastest to times[i]. After the loop, print fastest.
How do I find the smallest value in a list without min()?
Store the first item as the smallest so far. Loop through the list, and whenever an item is smaller than the stored value, replace it. The stored value at the end is the smallest.
How do you access a field of a record?
Write the record's name, a dot, and the field's name, such as race2.time.
More from this paper
- Question 3: A coaching cost with three price bands 8 marks
- Question 4: Validate a name by length until it is accepted, test data, and a username flowchart 13 marks
- Question 5: Data types, and five inputs rewritten as a loop with one 8 marks
- Question 11: Trace findLetter, then write the word game that calls it 14 marks
Every AQA 8525 question we have worked
Learn it step by step
- F3.6 Records Strings, lists and records
- F2.7 Loop patterns Decisions and loops
- F13.4 Programming questions Exam preparation
This is our own explanation of a published exam question. It is not written or endorsed by AQA, and the question paper and mark scheme remain AQA's copyright. Read them on AQA's site with the links on this page.