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

7 marks · Medium difficulty · Trace Table

Analyze a VB.NET program featuring a while loop to identify operations and statements, identify the relational operator, and complete a trace table.

Practise this question

Question

Question 01 displays a VB.NET code snippet in Figure 1 with numbered lines: line 1 is a comment; lines 2 to 4 declare integers a = 1, b = 1, c = 5; lines 5 to 9 form a While loop running while b < c, updating a = a + a, b = b + 1, and outputting a via Console.WriteLine(a). Part 01.1 asks where an arithmetic operation is first used (multiple choice). Part 01.2 asks to identify a false statement about the program from four options: contains a comment, uses assignment, uses concatenation, uses iteration. Part 01.3 asks to state the relational operator used. Part 01.4 provides a trace table with columns for a, b, c, and Output to be completed.
Question text

01 Figure 1 shows a program written in VB.NET.

• Line numbers are included but are not part of the program.

Figure 1

1 ' VB.NET program

2 Dim a As Integer = 1

3 Dim b As Integer = 1

4 Dim c As Integer = 5

5 While b < c

6 a = a + a

7 b = b + 1

8 Console.WriteLine(a)

9 End While

01.1 Where is an arithmetic operation first used in the program in Figure 1?

Shade one lozenge.

[1 mark]

A Line number 1

B Line number 5

C Line number 6

D Line number 8

01.2 Which of the following is a false statement about the program in Figure 1?

Shade one lozenge.

[1 mark]

A This program contains a comment.

B This program uses assignment.

C This program uses concatenation.

D This program uses iteration. 3

01.3 State the relational operator used in the program in Figure 1.

[1 mark]

01.4 Complete the trace table for the program in Figure 1.

You may not need to use all the rows in the table.

[4 marks]

a b c Output

Mark scheme

Show the mark scheme Mark scheme for Question 01: 01.1 awards 1 mark for C (Line number 6). 01.2 awards 1 mark for C (This program uses concatenation). 01.3 awards 1 mark for '<' or 'Less than'. 01.4 awards up to 4 marks for the completed trace table: row 1 initial values a=1, b=1, c=5; subsequent rows update a, b, and Output as: row 2: a=2, b=2, Output=2; row 3: a=4, b=3, Output=4; row 4: a=8, b=4, Output=8; row 5: a=16, b=5, Output=16.

Total

Question Part Marking guidance

marks

01 1 Mark is for AO2 (apply) 1

C Line number 6;

R. If more than one lozenge shaded

Total

Question Part Marking guidance

marks

01 2 Mark is for AO2 (apply) 1

C This program uses concatenation;

R. If more than one lozenge shaded

Total

Question Part Marking guidance

marks

01 3 Mark is for AO2 (apply) 1

<;

//

Less than;

R. =

Total

Question Part Marking guidance

marks

01 4 4 marks for AO2 (apply) 4

MP1: for the first value of column a and the first value of column b and the

first value of column c all correct;

MP2: for the correct first output (2);

MP3: for the rest of column a correct and the rest of the Output column

correct and neither containing any other values at the bottom of the

columns;

MP4: for the rest of column b correct and containing no other values;

Maximum 3 marks if any errors.

I. Different rows used as long as the order within columns is clear

I. Duplicate values on consecutive rows within a column

How to answer it

VB.NET Code Analysis & Trace Tables

AQA GCSE Computer Science • Paper 1 • Question 01 (7 Marks Total)

📋 What this question tests

This question assesses your understanding of fundamental programming constructs in high-level code (VB.NET):

  • Identifying arithmetic operators vs. relational (comparison) operators vs. assignment.
  • Recognising key programming terms: iteration, comments, and string concatenation.
  • Dry running and executing an algorithm step-by-step using a trace table with a condition-controlled ( While ) loop.

Program Code (Figure 1)

1 ' VB.NET program 2 Dim a As Integer = 1 3 Dim b As Integer = 1 4 Dim c As Integer = 5 5 While b < c 6 a = a + a 7 b = b + 1 8 Console.WriteLine(a) 9 End While

Part 01.1: Identifying Arithmetic Operations

Where is an arithmetic operation first used in the program? [1 mark]

✅ Correct Answer

C — Line number 6

Line 6 uses addition: a = a + a . The plus sign ( + ) here performs integer addition.

💡 Key Knowledge

  • Arithmetic operators: perform mathematical calculations ( + , - , * , / , MOD , DIV ).
  • Relational operators: compare two values ( < , > , = , <= , >= , <> ). Line 5 uses < , which is relational, not arithmetic!

❌ Common Errors

Choosing Line 5 because it has a comparison symbol ( < ), or confusing the assignment symbol ( = ) in lines 2–4 with an arithmetic operator.

🧠 Exam Technique

Read the word first carefully. Line 7 also has an arithmetic operation ( b + 1 ), but line 6 occurs earlier.

Mark Scheme Guidance: 1 mark for shading C (Line number 6). Reject if more than one lozenge is shaded.

Part 01.2: Program Terminology

Which of the following is a false statement about the program? [1 mark]

✅ Correct Answer

C — This program uses concatenation.

This statement is false because concatenation means joining two strings together (e.g. "Hello " & "World" ). No strings are joined in this code.

💡 Why the others are TRUE

  • A (Comment): Line 1 begins with an apostrophe ( ' ), which denotes a comment in VB.NET.
  • B (Assignment): Lines 2, 3, 4, 6, and 7 assign values to variables using = .
  • D (Iteration): Lines 5–9 use a While...End While loop (iteration).

🧠 Exam Technique: Negative Phrasing

When a question asks for a false statement, identify whether each option is True or False next to the option before shading your final choice.

❌ Common Errors

Mistaking the + operator on numbers for string concatenation. When used on integers, + performs addition.

Mark Scheme Guidance: 1 mark for shading C. Reject if more than one lozenge is shaded.

Part 01.3: Relational Operators

State the relational operator used in the program. [1 mark]

✅ Correct Answers

  • <
  • Less than

💡 Relational vs. Assignment

A relational operator compares two expressions and results in True or False . In line 5, b < c checks if b is strictly smaller than c .

❌ Common Errors (Mark Scheme Trap!)

Rejected: =
Although = can act as equality comparison in VB.NET conditionals, in this specific program it is strictly used for variable assignment (lines 2, 3, 4, 6, 7). The examiner explicitly rejects = .

🧠 Exam Technique

You can write either the mathematical symbol ( < ) or the name in English (less than). Both receive full credit.

Mark Scheme Guidance: Accept < or "Less than". Reject = .

Part 01.4: Completing the Trace Table

Complete the trace table for the program. [4 marks]

✅ Fully Completed Trace Table

a b c Output
1 1 5
2 2 2
4 3 4
8 4 8
16 5 16

📐 Step-by-Step Execution Walkthrough

  1. Initialisation (Lines 2–4): a = 1 , b = 1 , c = 5 . Record on row 1.
  2. Loop Iteration 1: Condition b < c is 1 < 5 (True).
    • Line 6: a = 1 + 1 = 2
    • Line 7: b = 1 + 1 = 2
    • Line 8: Output 2
  3. Loop Iteration 2: Condition 2 < 5 (True).
    • Line 6: a = 2 + 2 = 4
    • Line 7: b = 2 + 1 = 3
    • Line 8: Output 4
  4. Loop Iteration 3: Condition 3 < 5 (True).
    • Line 6: a = 4 + 4 = 8
    • Line 7: b = 3 + 1 = 4
    • Line 8: Output 8
  5. Loop Iteration 4: Condition 4 < 5 (True).
    • Line 6: a = 8 + 8 = 16
    • Line 7: b = 4 + 1 = 5
    • Line 8: Output 16
  6. Loop Check 5: Condition b < c is 5 < 5 (False!). Loop terminates. No more rows.

❌ Common Trace Table Traps

  • Repeating unchanged values: Do not rewrite 5 down the whole c column. In trace tables, only write values when they change.
  • Off-by-one errors: Thinking the loop runs when b = 5 . Since the test is < and not <= , it terminates when b reaches 5.
  • Missing the final variable update: Forgetting that b increments to 5 inside the last iteration before the loop terminates.

🧠 Mark Breakdown (How marks are awarded)

  • MP1: First value of a (1), b (1), and c (5) all correct.
  • MP2: Correct first output (2).
  • MP3: Rest of column a (4, 8, 16) AND rest of Output (4, 8, 16) correct with no extra values.
  • MP4: Rest of column b (2, 3, 4, 5) correct with no extra values.

Note: Maximum 3 marks if any single error is present.

Topics

3.1 Fundamentals of algorithms · 3.2 Programming · 3.1.1 Representing algorithms · 3.2.2 Programming concepts · 3.2.3 Arithmetic operations in a programming language · 3.2.4 Relational operations in a programming language

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.