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.

Past paper questionAQA 8525/1BJune 2025 Paper 18 marksWrite a program

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 = 0 means no real time is ever smaller, so the answer is always 0. Start with times[0], or with a number bigger than any possible time.
  • range(3). The example has three times, and the question says any size. Use len(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.

With 28.5, 26.3 and 30.0 the answer is 26.3. Put the fastest time first, last, and in an array of one, and check that it still works.
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)
Put this demo on your own site

Paste it into a school website, Moodle, Google Sites or a blog. More options on the embed page.

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

Every AQA 8525 question we have worked

Learn it step by step

  1. F3.6 Records Strings, lists and records
  2. F2.7 Loop patterns Decisions and loops
  3. F13.4 Programming questions Exam preparation
Open the lessons

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.