AQA GCSE Computer Science Paper 1 (1C), June 2025: Question 7
7 marks · Medium difficulty · Short Answer
Analyse a subroutine that uses the modulo operator to determine if an integer is even or odd, trace its outputs, identify its parameter, and state characteristics of the structured approach to programming.
Practise this questionQuestion
Question text
07 Figure 7 shows a subroutine written in pseudo-code.
Figure 7
SUBROUTINE testSub(number)
OUTPUT number
x number MOD 2
OUTPUT x
IF x = 0 THEN
RETURN True
ELSE
RETURN False
ENDIF
ENDSUBROUTINE
07.1 Describe the purpose of the subroutine in Figure 7.
[1 mark]
07.2 The subroutine in Figure 7 is called using testSub(10)
Complete the table to show the values output.
[2 marks]
Program Code Output
OUTPUT number
OUTPUT x
07.3 The subroutine in Figure 7 is called using testSub(8)
State the value returned.
[1 mark]
07.4 State the identifier for the parameter in Figure 7.
[1 mark]
0 7*.205*State two characteristics of the structured approach to programming.
[2 marks]
Mark scheme
Show the mark scheme
Total
Question Part Marking guidance
marks
07 1 Mark is for AO2 (apply) 1
Maximum of 1 mark from:
● To determine if a number/x is odd/even // To determine if a
number/x is a multiple of 2;
● To return True if a number/x is even // To return False if a
number is odd;
● To return True if a number/x is a multiple of 2 // To return False if
a number/x is not (a multiple of 2);
● To return True if the remainder (of the integer division) is 0 // To
return False if the remainder is 1 / not 0;
Total
Question Part Marking guidance
marks
07 2 2 marks for AO2 (apply) 2
Program Code Output
OUTPUT number 10;
OUTPUT x 0;
Total
Question Part Marking guidance
marks
07 3 Mark is for AO2 (apply) 1
True;
I. Case
Total
Question Part Marking guidance
marks
07 4 Mark is for AO2 (apply) 1
number;
I. Case
Total
Question Part Marking guidance
marks
07 5 2 marks for AO1 (understanding) 2
Maximum of 2 marks from:
● (is) modularised // broken down into sections/chunks // (uses)
subroutines // named/out of line blocks of code;
● (uses) parameters;
● (uses) return values;
● (uses) local variables;
● (uses) selection;
● (uses) iteration;
● (uses) well documented interfaces;
How to answer it
Subroutine Tracing & Structured Programming
This question assesses your ability to read and trace pseudo-code subroutines, understand the modulo operator ( MOD ), distinguish between outputting and returning data, identify parameters, and recall the core principles of the structured approach to programming.
Code Provided in Figure 7
Purpose of the Subroutine
Describe the purpose of the subroutine in Figure 7. [1 mark]
✅ Acceptable Answers (Any one)
- To determine if a number is even or odd.
- To check if a number is a multiple of 2.
- Returns True if the number is even (or multiple of 2), otherwise returns False .
- Returns True if remainder is 0, False if remainder is 1.
💡 Key Knowledge: The MOD Operator
A MOD B calculates the integer remainder when A is divided by B. Dividing any whole number by 2 leaves either:
- 0 → The number is even.
- 1 → The number is odd.
Tracing Outputs for testSub(10)
Complete the table to show the values output. [2 marks]
✅ Completed Table
| Program Code | Output |
|---|---|
| OUTPUT number | 10 |
| OUTPUT x | 0 |
📐 Step-by-Step Execution
- Subroutine is called with argument 10 , so number = 10 .
- Line 2 executes: prints value of number → 10.
- Line 3 executes: x ← 10 MOD 2 . Since 10 ÷ 2 = 5 with remainder 0, x = 0 .
- Line 4 executes: prints value of x → 0.
❌ Common Trap: Output vs Return
Do not write True in this table! The question specifically asks for values from the OUTPUT statements, not the RETURN value.
Determining the Return Value
The subroutine is called using testSub(8) . State the value returned. [1 mark]
✅ Correct Answer
True
(Mark scheme accepts "true" - case-insensitive)
🧠 Exam Technique
Trace line 5: 8 MOD 2 = 0 , so x = 0 . The condition IF x = 0 is satisfied, causing the subroutine to execute RETURN True immediately.
Identifying Parameters
State the identifier for the parameter in Figure 7. [1 mark]
✅ Correct Answer
number
(Mark scheme is case-insensitive)
💡 Identifier Terminology
- Parameter: The special variable listed inside the subroutine header parenthesis that receives data (here: number ).
- Argument: The actual value passed in during the call (e.g., 8 or 10 ).
- Local Variable: A variable created inside the subroutine body (here: x ).
❌ Common Errors
Writing testSub (that is the subroutine name), writing x (that is an internal local variable), or writing 10 (that is an argument value, not a parameter identifier).
Structured Approach to Programming
State two characteristics of the structured approach to programming. [2 marks]
✅ Acceptable Answers (State any two)
- Modularisation: Breaking code down into smaller sections, modules, or subroutines.
- Uses parameters (to pass data into subroutines).
- Uses return values (to pass results back).
- Uses local variables (avoids relying on global state).
- Uses standard control structures: sequence, selection (IF-statements), and iteration (loops).
- Uses well-documented interfaces.
🧠 Exam Tip for AO1 Recall
A structured program is like building with Lego blocks: each block (subroutine) does one job, has clearly defined inputs (parameters) and outputs (return values), keeping variables contained locally (local variables).
❌ Common Misconceptions
Do not give vague benefits such as "it is easier to read" or "makes debugging faster". The question asks for characteristics (what structured code is made of / how it is built), not its advantages.
Topics
3.1 Fundamentals of algorithms · 3.2 Programming · 3.1.1 Representing algorithms · 3.2.3 Arithmetic operations in a programming language · 3.2.7 Input/output · 3.2.10 Structured programming and subroutines (procedures and functions)
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.