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 question

Question

Question 07 shows Figure 7 containing pseudo-code for a subroutine: SUBROUTINE testSub(number), which outputs number, assigns x = number MOD 2, outputs x, and returns True if x is 0, else False. Sub-questions ask to: 07.1 describe the purpose of the subroutine (1 mark); 07.2 complete a table showing outputs when called with testSub(10) (2 marks); 07.3 state the value returned when called with testSub(8) (1 mark); 07.4 state the parameter identifier (1 mark); and 07.5 state two characteristics of the structured approach to programming (2 marks).
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 Mark scheme for Question 07: 07.1 accepts determining if a number is odd/even or a multiple of 2, or returning True if even / False if odd (1 mark). 07.2 awards 2 marks for filling the table with 10 for OUTPUT number and 0 for OUTPUT x. 07.3 awards 1 mark for True (case insensitive). 07.4 awards 1 mark for 'number' (case insensitive). 07.5 awards 2 marks for any two characteristics of structured programming such as modularisation, use of subroutines, parameters, return values, local variables, selection, iteration, or well-documented interfaces.

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

WHAT THIS QUESTION TESTS

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

SUBROUTINE testSub(number) OUTPUT number x ← number MOD 2 OUTPUT x IF x = 0 THEN RETURN True ELSE RETURN False ENDIF ENDSUBROUTINE
QUESTION 07.1

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.
🎯 Mark Scheme Breakdown: 1 mark (AO2) for accurately describing that the subroutine tests for even/odd parity or divisibility by 2.
QUESTION 07.2

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

  1. Subroutine is called with argument 10 , so number = 10 .
  2. Line 2 executes: prints value of number → 10.
  3. Line 3 executes: x ← 10 MOD 2 . Since 10 ÷ 2 = 5 with remainder 0, x = 0 .
  4. 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.

🎯 Mark Scheme Breakdown: 1 mark for each correct row (1 mark for 10 , 1 mark for 0 ).
QUESTION 07.3

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.

🎯 Mark Scheme Breakdown: 1 mark (AO2) for True .
QUESTION 07.4

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).

🎯 Mark Scheme Breakdown: 1 mark (AO2) for strictly naming number .
QUESTION 07.5

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.

🎯 Mark Scheme Breakdown: 2 marks (AO1) — 1 mark for each valid characteristic listed up to a maximum of 2.

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.