AQA GCSE Computer Science Paper 1 (1C), June 2025: Question 10

8 marks · Hard difficulty · Programming

Work with a record data structure in pseudo-code and write a VB.NET program to find the fastest time in an array.

Practise this question

Question

Question 10 describes a record structure named Runner with fields event (String), runnerNumber (Integer), and time (Real). Question 10.1 gives sample instantiations and asks to write the pseudo-code to instantiate race3 with event '200 m', runnerNumber 10, and time 32.59. Question 10.2 asks to complete the statement 'OUTPUT race2' to output its time. Question 10.3 asks to write a VB.NET program to find and output the minimum value (fastest time) in an array called times of any size, without using built-in min or sort routines, followed by an indentation grid.
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 VB.NET 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 meaningful variable name(s) and VB.NET syntax in your answer.

The answer grid below contains vertical lines to help you indent your code.

[6 marks]

Mark scheme

Show the mark scheme Mark scheme for question 10. Part 10.1 awards 1 mark for Runner('200 m', 10, 32.59). Part 10.2 awards 1 mark for .time. Part 10.3 awards 6 marks total: Mark A for finding length of array; Mark B for initialising a minimum variable; Mark C for looping through the array; Mark D for comparing values using less than; Mark E for updating the minimum variable; Mark F for outputting the result once. Two model VB.NET solutions are provided (one using a standard For loop, one using For Each).

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 Structures & Finding Minimum Values

📌 What this question tests

This question assesses your understanding of composite data structures (records) in pseudo-code and your ability to write procedural code (in VB.NET) to process standard 1D arrays. Specifically, you need to know how to instantiate a record, access a record field via dot notation, and implement a standard find-the-minimum algorithm without using built-in helper methods.

Question 10.1

Instantiating a Record

Completing pseudo-code to create an instance of a record structure [1 mark]

✅ Correct Answer

Runner('200 m', 10, 32.59)

Mark Scheme: 1 mark for exact syntax matching the record fields in order: String, Integer, Real. Quotes around the string are mandatory. Semicolon at the end is optional.

💡 Key Knowledge: Record Instantiation

  • A record is a collection of related fields, which can each have different data types.
  • Look at the examples already given:
    race1 ← Runner('400 m', 23, 51.35)
  • Follow the pattern exactly: Constructor name Runner(...) , passing arguments matching the defined structure in order.

🧠 Exam Technique

Always inspect the pattern provided directly above the question in Figure 11. The question already gave two perfectly formatted examples. Match the types: event is a string (quotes needed), runnerNumber is an integer, time is a real number.

❌ Common Errors

  • Missing quotes: Writing Runner(200 m, 10, 32.59) loses the mark because 200 m is a string literal.
  • Omitting parentheses: Missing brackets or commas.
  • Missing constructor name: Just writing the values ('200 m', 10, 32.59) without Runner .
Question 10.2

Accessing Record Fields

Outputting a specific field value using dot notation [1 mark]

✅ Correct Answer

.time

So the full completed line reads: OUTPUT race2.time

Mark Scheme: 1 mark for .time . The period (dot) is essential. Case-insensitive.

💡 Key Knowledge: Dot Notation

  • Fields in a record are accessed using dot notation:
    recordVariable.fieldName
  • The prompt gives you OUTPUT race2 . You only need to provide the selector for the field: .time .

🧠 Exam Technique

Carefully check what the question has already printed on the answer line! The prompt provides the start: OUTPUT race2 . Do not write OUTPUT race2.time on the blank, just write .time .

❌ Common Errors

  • Missing the dot: Writing just time without the full stop.
  • Array syntax confusion: Writing [time] or ['time'] . Records use dot notation, not square bracket indexing.
Question 10.3

Finding the Minimum in an Array (VB.NET)

Writing a program to find the fastest (smallest) value in an array [6 marks]

✅ Correct Answer (Option 1: For Loop)

Dim fastest As Double = times(0) For i = 1 To times.Length - 1 If times(i) < fastest Then fastest = times(i) End If Next Console.WriteLine(fastest)

✅ Correct Answer (Option 2: For Each Loop)

Dim fastest As Double = times(0) For Each t In times If t < fastest Then fastest = t End If Next Console.WriteLine(fastest)

📐 Mark Breakdown (6 Marks Total: 1 Design + 5 Logic)

  • Mark A (AO3 Design): Attempting to calculate or obtain the length/bounds of the array (e.g., using times.Length or For Each across the whole collection).
  • Mark B (AO3 Program): Initialising the minimum tracker variable to an appropriate value (e.g. the first element times(0) ).
  • Mark C (AO3 Program): Using a loop to correctly iterate through an array of any length.
  • Mark D (AO3 Program): Using an If statement to compare array elements to check if they are smaller than current fastest.
  • Mark E (AO3 Program): Correctly updating the stored fastest value whenever a smaller item is found.
  • Mark F (AO3 Program): Outputting the fastest value exactly once, placed outside/after the loop.

🧠 Exam Technique: Standard Min/Max Algorithm

  1. Always seed with the first item: Set best = times(0) rather than an arbitrary number like 0 (if you set min to 0, times like 26.3 will never be smaller!).
  2. Output AFTER the loop: Placing Console.WriteLine inside the loop prints during every step and loses Mark F.
  3. Follow language constraints: Notice the question says "must not use any built-in routines to find the smallest value or sort". Using times.Min() or Array.Sort() will disqualify Marks D and E.

❌ Common Errors

  • Initialising to 0: Initialising a "minimum" search with fastest = 0 . Since running times are positive, no element will ever be smaller than 0!
  • Hardcoding the length: Writing For i = 0 To 2 . The specification explicitly demands it works with any size of array.
  • Off-by-one boundary error: In VB.NET, arrays are 0-indexed. Looping from 0 To times.Length causes an IndexOutOfRangeException . It must be times.Length - 1 .
  • Using built-in functions: Writing Console.WriteLine(times.Min()) ignores the algorithmic requirements and caps marks significantly.

Topics

3.2 Programming · 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 (1C), June 2025. QuestionVault is an independent revision resource; questions remain the copyright of the awarding body.