Please write clearly in block capitals.
Centre number Candidate number
Surname
Forename(s)
Candidate signature
I declare this is my own work.
GCSE
COMPUTER SCIENCE
Paper 1 Computational thinking and programming skills – C#
Monday 12 May 2025 Afternoon Time allowed: 2 hours
, 2
Do not write
outside the
Answer all questions. box
0 1 Figure 1 shows a program written in C#.
• Line numbers are included but are not part of the program.
Figure 1
1 // C# program
2 int a = 1;
3 int b = 1;
4 int c = 5;
5 while (b < c) {
6 a = a + a;
7 b = b + 1;
8 Console.WriteLine(a);
9 }
0 1 . 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
0 1 . 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.
*02*
IB/G/Jun25/8525/1A
, 3
Do not write
outside the
0 1 . 3 State the relational operator used in the program in Figure 1. box
[1 mark]
0 1 . 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
7
Turn over for the next question
Turn over ►
*03*
IB/G/Jun25/8525/1A
, 4
Do not write
outside the
0 2 A coffee shop has a loyalty scheme which rewards customers for buying drinks. box
The customer gets one stamp on their loyalty card for each individual drink they buy.
• Every 4th stamp on the card gets the customer a free biscuit.
• Every 5th stamp on the card gets the customer a free pastry.
• When the customer reaches 20 stamps, they get a free cake (but no biscuit or
pastry).
The C# program shown in Figure 2 should display whether the customer gets a free
biscuit, pastry, cake or nothing free for each of their first 20 drinks.
For each drink purchased, the program must output either: "Free biscuit",
"Free pastry", "Free cake" or "Nothing free".
Some parts of the program have been replaced with the labels to .
Figure 2
int i = 1;
while (i <= 20) {
if (i % 20 == 0) {
Console.WriteLine("Free cake");
}
else if ( ) {
Console.WriteLine("Free pastry");
}
else if (i % 4 == 0) {
;
}
else {
;
}
i = i + 1;
}
0 2 . 1 State the C# code that should be written in place of the labels in the program
written in Figure 2.
[3 marks]
*04*
IB/G/Jun25/8525/1A
Centre number Candidate number
Surname
Forename(s)
Candidate signature
I declare this is my own work.
GCSE
COMPUTER SCIENCE
Paper 1 Computational thinking and programming skills – C#
Monday 12 May 2025 Afternoon Time allowed: 2 hours
, 2
Do not write
outside the
Answer all questions. box
0 1 Figure 1 shows a program written in C#.
• Line numbers are included but are not part of the program.
Figure 1
1 // C# program
2 int a = 1;
3 int b = 1;
4 int c = 5;
5 while (b < c) {
6 a = a + a;
7 b = b + 1;
8 Console.WriteLine(a);
9 }
0 1 . 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
0 1 . 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.
*02*
IB/G/Jun25/8525/1A
, 3
Do not write
outside the
0 1 . 3 State the relational operator used in the program in Figure 1. box
[1 mark]
0 1 . 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
7
Turn over for the next question
Turn over ►
*03*
IB/G/Jun25/8525/1A
, 4
Do not write
outside the
0 2 A coffee shop has a loyalty scheme which rewards customers for buying drinks. box
The customer gets one stamp on their loyalty card for each individual drink they buy.
• Every 4th stamp on the card gets the customer a free biscuit.
• Every 5th stamp on the card gets the customer a free pastry.
• When the customer reaches 20 stamps, they get a free cake (but no biscuit or
pastry).
The C# program shown in Figure 2 should display whether the customer gets a free
biscuit, pastry, cake or nothing free for each of their first 20 drinks.
For each drink purchased, the program must output either: "Free biscuit",
"Free pastry", "Free cake" or "Nothing free".
Some parts of the program have been replaced with the labels to .
Figure 2
int i = 1;
while (i <= 20) {
if (i % 20 == 0) {
Console.WriteLine("Free cake");
}
else if ( ) {
Console.WriteLine("Free pastry");
}
else if (i % 4 == 0) {
;
}
else {
;
}
i = i + 1;
}
0 2 . 1 State the C# code that should be written in place of the labels in the program
written in Figure 2.
[3 marks]
*04*
IB/G/Jun25/8525/1A