Computer Science · Specimen · Mark scheme · Paper 1 Computational thinking and programming skills

AQA GCSE Computer Science mark scheme for Paper 1 Computational thinking and programming skills, Specimen — 8525, file AQA-8525-Paper-1-Computational-thinking-and-programming-skills-MS-SQP1.pdf.

Advertisement
Loading the paper…
Text of this paper

GCSE
COMPUTER SCIENCE
8525A/1, 8525B/1, 8525C/1
Paper 1 Computational thinking and programming skills

Mark scheme

Specimen Assessment Materials

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Mark schemes are prepared by the Lead Assessment Writer and considered, together with the relevant
questions, by a panel of subject teachers. This mark scheme includes any amendments made at the
standardisation events which all associates participate in and is the scheme which was used by them in
this examination. The standardisation process ensures that the mark scheme covers the students’
responses to questions and that every associate understands and applies it in the same correct way.
As preparation for standardisation each associate analyses a number of students’ scripts. Alternative
answers not already covered by the mark scheme are discussed and legislated for. If, after the
standardisation process, associates encounter unusual answers which have not been raised they are
required to refer these to the Lead Examiner.
It must be stressed that a mark scheme is a working document, in many cases further developed and
expanded on the basis of students’ reactions to a particular paper. Assumptions about future mark
schemes on the basis of one year’s document should be avoided; whilst the guiding principles of
assessment remain constant, details will change, depending on the content of a particular examination
paper.
Further copies of this mark scheme are available from aqa.org.uk
The following annotation is used in the mark scheme:
;

- means a single mark

//

- means alternative response

/

- means an alternative word or sub-phrase

A

- means acceptable creditworthy answer. Also used to denote a valid answer that goes beyond
the expectations of the GCSE syllabus.

R

- means reject answer as not creditworthy

NE - means not enough
I

- means ignore

DPT - in some questions a specific error made by a candidate, if repeated, could result in the
candidate failing to gain more than one mark. The DPT label indicates that this mistake should
only result in a candidate losing one mark on the first occasion that the error is made. Provided
that the answer remains understandable, subsequent marks should be awarded as if the error
was not being repeated.

2

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Note to Examiners
In the real world minor syntax errors are often identified and flagged by the development environment.
To reflect this, all responses in a high-level programming language will assess a candidate’s ability to
create an answer using precise programming commands/instructions but will avoid penalising them for
minor errors in syntax.
When marking program code, examiners must take account of the different rules between the languages
and only consider how the syntax affects the logic flow of the program. If the syntax is not perfect but the
logic flow is unaffected then the response should not be penalised.
The case of all program code written by students is to be ignored for the purposes of marking. This is
because it is not always clear which case has been used depending on the style and quality of
handwriting used.
Examiners must ensure they follow the mark scheme instructions exactly. If an examiner is unsure as to
whether a given response is worthy of the marks they must escalate the question to their team leader.

3

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

01

Part

1

Total
marks

Marking guidance

2 marks for AO1 (recall)

2

A sequence of steps/instructions;
that can be followed to complete a task;
A. Different wording with similar meaning
01

2

3 marks for AO1 (recall)

3

One mark for each correct distinct label.
If the answers given were, for example, C, C, B then award only 1 mark for
the B as the C is duplicated. Likewise if C, C, C was the answer then no
marks would be given. The correct table is:
Label
Breaking a problem down into a number of sub-problems

C

The process of setting the value stored in a variable

A

Defines the sort of values a variable may take

B

A. If actual terms are written out instead of labels
R. All instances of duplicate labels
02

1

Mark is for AO2 (apply)

1

D 4;
R. If more than one lozenge shaded
02

2

Mark is for AO2 (apply)

1

D'computer sciencegcse';
R. If more than one lozenge shaded
03

1

Mark is for AO2 (apply)

1

A Line number 2;
R. If more than one lozenge shaded
03

2

Mark is for AO2 (apply)
C Line number 11;
R. If more than one lozenge shaded

4

1

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

03

Part

3

Marking guidance

Total
marks

Mark is for AO2 (apply)

1

A 1 subroutine call;
R. If more than one lozenge shaded
03

4

Mark is for AO2 (apply)

1

B String;
R. If more than one lozenge shaded
03

5

Mark is for AO2 (apply)

1

2//twice//two;
04

5 marks for AO3 (program)

5

1 mark for each correct item in the correct location.
Python

num1 = int(input("Enter a number: "))
num2 =

int

if num1 > num2:
print("

num1

print("

num2

elif num1
else:

<

(input("Enter a second number: "))
is bigger.")

num2:

is bigger.")

print("The numbers are equal.")

I. Case of response
R. if any spelling mistakes
C#

int num1;
int
num2;
Console.WriteLine("Enter a number: ");
num1 = int.Parse(Console.ReadLine());
Console.WriteLine("Enter another number: ");
num2 = int.Parse(Console.ReadLine());
5

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

if (num1 > num2)
{
Console.WriteLine("
num1
is bigger.");
}
else
if (num1 <
num2)
{
Console.WriteLine("
num2
is bigger.");
}
else
{
Console.WriteLine("The numbers are equal.");
}
I. Case of response
R. if any spelling mistakes
VB.Net

Dim num1 As Integer
Dim num2 As

Integer

Console.Write("Enter a number: ")
num1 = Console.ReadLine()
Console.Write("Enter another number: ")
num2 = Console.ReadLine()
If num1 > num2 Then

Console.WriteLine("

num1

is bigger.")

Console.WriteLine("

num2

is bigger.")

ElseIf num1

<

Else

num2 Then

Console.WriteLine("The numbers are equal.")

End If

I. Case of response
R. if any spelling mistakes

6

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

05

Part

Total
marks

Marking guidance

2 marks for AO3 (design) and 5 marks for AO3 (program)

7

Program Design
Mark A for using meaningful variable names throughout (even if logic is
incorrect);
Mark B for using suitable data types throughout (distance can be real or
integer, passengers must be integer);
Program Logic
Mark C for getting user input for the distance in an appropriate place;
Mark D for getting user input for the number of passengers in an appropriate
place;
Mark E for a fare that correctly charges £2 per passenger;
Mark F for a fare that correctly charges £1.50 for every kilometre;
Mark G for outputting the correct final fare;
I. Case of program code
Maximum 6 marks if any errors in code.
Python Example 1 (fully correct)
Mark A awarded.
distance = float(input())
passengers = int(input())
fare = 2 * passengers
fare = fare + (1.5 * distance)
print(fare)

(Part of B, C)
(Part of B, D)
(E)
(F)
(G)

C# Example (fully correct)
Mark A awarded.
int passengers;
double distance, fare;
distance = double.Parse(Console.ReadLine());
passengers = int.Parse(Console.ReadLine());
fare = 2 * passengers;
fare = fare + (1.5 * distance);
Console.WriteLine(fare);

(Part of B)
(Part of B)
(C)
(D)
(E)
(F)
(G)

I. indentation in C#
VB Example (fully correct)
Marks A, B awarded.
Dim distance, fare As Double
Dim passengers As Integer
distance = Console.ReadLine()
passengers = Console.ReadLine()

(Part of B)
(Part of B)
(C)
(D)
7

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

fare = 2 * passengers
fare = fare + (1.5 * distance)
Console.WriteLine(fare)

(E)
(F)
(G)

I. indentation in VB.NET
Python Example 2 (partially correct – 6 marks)
Mark A awarded. Mark B not awarded because float conversion missing.
dist = input()
pass = int(input())
fare = 2 * pass
fare = 1.5 * dist
print fare

8

(C but NOT B)
(Part of B, D)
(E)
(F)
(G – still awarded even though
parentheses missing in print command
as logic still clear)

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

06

Part

Total
marks

Marking guidance

2 marks for AO3 (design), 3 marks for AO3 (program)

5

Program Design
Mark A for the use of a selection construct (even if the logic is incorrect);
Mark B for the correct, consistent use of meaningful variable names
throughout (even if the code would not work);
Program Logic
Mark C for using user input and storing the result in a variable correctly;
Mark D for a correct expression that checks if the entered password is
ˈsecretˈ (even if the syntax is incorrect);
Mark E for outputting Welcome and Not welcome correctly in logically
separate places such as the IF and ELSE part of selection;
I. Case of output strings for Mark E, but spelling must be correct.
I. Case of program code
Maximum 4 marks if any errors in code.
Python Example 1 (fully correct)
All design marks are achieved (Marks A and B)
password = input()
if password == 'secret':
print('Welcome')
else:
print('Not welcome')

(C)
(D)
(Part of E)
(Part of E)

C# Example (fully correct)
All design marks are achieved (Marks A and B)
string password;
password = Console.ReadLine();
if (password == "secret")
{
Console.WriteLine("Welcome");
}
else
{
Console.WriteLine("Not welcome");
}

(C)
(D)
(Part of E)

(Part of E)

I. indentation in C#
VB Example (fully correct)
All design marks are achieved (Marks A and B)
Dim password As String
password = Console.ReadLine()

(C)
9

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

If (password = "secret") Then
Console.WriteLine("Welcome")
Else
Console.WriteLine("Not welcome")
End If

(D)
(Part of E)
(Part of E)

I. indentation in VB.NET
Python Example 2 (partially correct – 4 marks)
Mark A is awarded. Mark B is not awarded.
p = input()
if p == 'secret'
print('Welcome')
else:
print('Not welcome')

10

(C)
(D)
(Part of E)
(Part of E)

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

07

Part

1

Total
marks

Marking guidance

Mark is for AO2 (apply)

1

Boolean//bool;
I. Case
07

2

2 marks for AO2 (apply)

2

(The identifier) swapsMade describes the purpose//role//meaning of the
variable;
this makes the algorithm easier to understand//maintain//follow;
or
(The identifier) s does not describe the purpose//role//meaning of the
variable;
this makes the algorithm harder to understand//maintain//follow;
07

3

Mark is for AO2 (apply)

1

A The algorithm uses a named constant;
R. If more than one lozenge shaded
07

4

6 marks for AO2 (apply)

6

1 mark for column arr[0] correct;
1 mark for column arr[1] correct;
1 mark for column arr[2] correct only if arr[0] and arr[1] are
correct;
1 mark for swapsMade column correct;
1 mark for i column correct;
1 mark for t column correct;

0

Arr
1

1

4

4

1

2
6

swapsMade

i

false
true
false

0

true

1
2
0
1
2

t
4

I. different rows used as long as the order within columns is clear
I. duplicate values on consecutive rows within a column

11

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

08

Part

Total
marks

Marking guidance

3 marks for AO3 (design), 4 marks for AO3 (program)

7

Program Design
Mark A for the idea of inputting a character and checking if it is lower case
(even if the code would not work);
Mark B for the use of a selection construct (even if the logic is incorrect);
Mark C for the correct, consistent use of meaningful variable names
throughout (even if the code would not work);
Program Logic
Mark D for using user input correctly;
Mark E for storing the result of user input in a variable correctly;
Mark F for a correct expression/method that checks if the character is
lowercase;
Mark G for outputting LOWER and NOT LOWER correctly in logically separate
places such as the IF and ELSE part of selection;
I. Case of output strings for Mark G, but spelling must be correct.
I. Case of program code
Maximum 6 marks if any errors in code.
Python Example 1 (fully correct)
All design marks are achieved (Marks A, B and C)
character = input()
if (character >= ′a′) and (character <= ′z′):
print(ˈLOWERˈ)
else:
print(ˈNOT LOWERˈ)

(D,E)
(F)
(Part of G)
(Part of G)

Python Example 2 (fully correct)
All design marks are achieved (Marks A, B and C)
character = input()
if character.islower():
print('LOWER')
else:
print('NOT LOWER')

12

(D,E)
(F)
(Part of G)
(Part of G)

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

C# Example (fully correct)
All design marks are achieved (Marks A, B and C)
char character = (char)Console.Read();
if (Char.IsLower(character))
{
Console.WriteLine("LOWER");
}
else
{
Console.WriteLine("NOT LOWER");
}

(D,E)
(F)
(Part of G)

(Part of G)

I. indentation in C#
VB.Net Example (fully correct)
All design marks are achieved (Marks A, B and C)
Dim character As Char
character = Console.ReadLine()
If (Char.IsLower(character)) Then
Console.WriteLine("LOWER")
Else
Console.WriteLine("NOT LOWER")
End If

(D,E)
(F)
(Part of G)
(Part of G)

I. indentation in VB.NET
Python Example 3 (partially correct – 5 marks)
All design marks are achieved (Marks A, B and C)
character = input()
if (character > ′a′) or (character < ′z′):
print(ˈNOT LOWERˈ)
else:
print(ˈLOWERˈ)

(D,E)
(NOT F)
(NOT G)
(NOT G)

13

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

09

Part

1

Total
marks

Marking guidance

3 marks for AO2 (apply)

3

Mark as follows:
1 mark for the robot moving to both squares marked A;
1 mark for the robot moving to the square marked B;
1 mark for the robot moving to the square marked C;

C
B

A
A
↑

14

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

09

Part

2

Total
marks

Marking guidance

3 marks for AO2 (apply)

3

Mark as follows:
1 mark for the robot moving to the square marked A;
1 mark for the robot moving to the square marked B;
1 mark for the robot moving to the square marked C;

C
B
A

10

↑

2

2 Marks for AO1 (understanding)
Max 2 marks from:
Subroutines can be developed in isolation/independently/separately;
Easier to discover errors/testing is more effective (than without a structure);
Subroutines can be updated without affecting the overall program;
A. Other valid reasons
5 marks for AO2 (apply)

11

5

1 mark for each correct change (allow follow on);
The correct sequence is:
3
3
3
1
1
12

1

1
1
1
3
3

5
4
4
4
2

4
5
2
2
4

2
2
5
5
5

1 mark for AO1 (recall)

1

A Abstraction;
R. if more than one lozenge shaded

15

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

12

Part

2

Total
marks

Marking guidance

2 marks for AO2 (apply)

2

All friends have different first names;
The time is rounded up to the nearest half-hour;
13

1

3 marks for AO2 (apply)

3

1 mark for C written once and in column 1;
1 mark for A and B written once and both in column 2 (in any order);
1 mark for A and B written once and in correct positions in column 2;
Column 0

Column 1

C
13

2

Column 2
A
B

3 marks for AO2 (apply)

3

1 mark for A written once and in correct column (0);
1 mark for B written once and in correct column (2);
1 mark for C written once and in correct column (1);
Column 0

A

16

Column 1

C

Column 2

B

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

13

Part

3

Marking guidance

4 marks for AO3 (design)

Total
marks

4

Mark A for using a WHILE loop or similar to move from column 0 to column
2;
Mark B for a Boolean condition that detects when column 0 is empty;
Mark C for using a second WHILE loop or similar to move the result from A
and B into column 1 (both the loop and the associated Boolean condition
need to be correct to gain this mark);
or
Mark A for using a FOR loop or similar to move from column 0 to column 2;
Mark B for ascertaining the terminating value for the FOR loop;
Mark C for using a second FOR loop or similar to move the result from A
and B into column 1 (both the loop and the associated terminating value
need to be correct to gain this mark);
and
Mark D for using the subroutines correctly throughout, i.e. called with
appropriate parameters and return values handled correctly;
A. Minor spelling errors such as HIEGHT for HEIGHT
I. Case
Example 1
WHILE HEIGHT(0) > 0
MOVE(0, 2)
ENDWHILE
WHILE HEIGHT(2) > 0
MOVE(2, 1)
ENDWHILE

(Part of A, B)
(Part of A)
(Part of C)
(Part of C)

(MOVE and HEIGHT are used correctly throughout so D.)
Example 2
DO

MOVE(0, 2)
WHILE HEIGHT(0) > 0
DO
MOVE(2, 1)
WHILE HEIGHT(2) > 0

(Part of A)
(Part of A)
(Part of A, B)
(Part of C)
(Part of C)
(Part of C)

(MOVE and HEIGHT are used correctly throughout so D.)

17

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Example 3
REPEAT
MOVE(0, 2)
UNTIL HEIGHT(0) = 0
REPEAT
MOVE(2, 1)
WHILE HEIGHT(2) = 0

(Part of A)
(Part of A)
(Part of A, B)
(Part of C)
(Part of C)
(Part of C)

(MOVE and HEIGHT are used correctly throughout so D.)
Example 4
number_of_blocks  HEIGHT(0)
FOR x  0 TO number_of_blocks
MOVE(0, 2)
ENDFOR
FOR x  0 TO number_of_blocks
MOVE(2, 1)
ENDFOR

(Part of B)
(Part of A, Part of B)
(Part of A)
(Part of C)
(Part of C)
(Part of C)

(MOVE and HEIGHT are used correctly throughout so D.)
Example 5

(MOVE and HEIGHT are used correctly throughout so D.)

18

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

14

Part

Marking guidance

1 mark for AO3 (refine)

Total
marks

1

B;
R. if more than 1 lozenge shaded

15

4 marks for AO3 (refine)

4

Program Logic
Mark A: for using a selection structure with else part or two selection
structures (even if the syntax is incorrect)
Mark B: for correct condition(s) in selection statement(s) (even if the syntax
is incorrect)
Mark C: for statement that subtracts two from odd under the correct
conditions (even if the syntax is incorrect)
Mark D: for odd being output and doing one of adding or subtracting two
but not both each time loop repeats (even if the syntax is incorrect)
I. while loop from question if included in answer
I. case of program code
Maximum 3 marks if any errors in code.
Python Example 1 (fully correct)
print(odd)
if number < 0
odd = odd – 2
else:
odd = odd + 2

(Part of D)
(A, B)
(C, Part of D)
(Part of D)

C# Example (fully correct)
Console.WriteLine(odd);
if (number < 0)
{
odd = odd - 2;
}
else
{
odd = odd + 2;
}

(Part of D)
(A, B)
(C, Part of D)

(Part of D)

I. indentation in C#

19

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

VB.Net Example (fully correct)
Console.WriteLine(odd)
If number < 0 Then
odd = odd – 2
Else
odd = odd + 2
End If

(Part of D)
(A, B)
(C, Part of D)
(Part of D)

I. indentation in VB.Net
Python Example 2 (partially correct – 3 marks)
(Part of D)
(A, NOT B)
(C, Part of D)

print(odd)
if number != 0
odd = odd – 2
else:
odd = odd + 2

(Part of D)

2 marks for AO3 (test)

16

Test type

Test data

Normal data

5

Invalid data

Any value
other than the
numbers 1 to
10 inclusive

Boundary
data

Any one of
0, 1, 10 or 11

2
Expected result

Valid choice message displayed
Invalid choice (message displayed)
if 1 or 10 given as test data

Valid choice (message displayed)
if 0 or 11 given as test data

Invalid choice (message displayed)
1 mark for each completely correct row to a maximum of 2 marks.

17

1

1 mark for AO3 (test)

1

2;
17

2

1 mark for AO3 (test)

1

5;
17

3

1 mark for AO3 (refine)
Change the < sign to <= // change num1 to num1 + 1;
A. answers where line of code has been rewritten

20

1

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Question

18

Part

Total
marks

Marking guidance

2 marks for AO3 (design) and 6 marks for AO3 (program)

8

Program Design
Mark A for using an iterative structure to validate the user input of speed (even
if logic is incorrect);
Mark B for using meaningful variable names and suitable data types
throughout (speed can be real or integer, breaking distance must be real, the
IsWet input must be string);
Program Logic
Mark C for getting user input for both the speed and IsWet in appropriate
places;
Mark D for using a WHILE loop or similar to re-prompt for the user input (even
if it would not work);
Mark E for using a correct Boolean condition with the validation structure;
Mark F for calculating the braking distance correctly (i.e. divided by 5);
Mark G for using a selection structure to adjust the braking distance calculation
if the user input required it (even if it would not work);
Mark H for outputting the braking distance in a logically correct place;
I. Case of program code
Maximum 7 marks if any errors in code.
Python Example (fully correct)
All design marks are achieved (Marks A and B)
speed = float(input())
while speed < 10 or speed > 50:
speed = float(input())
braking_distance = speed / 5

(Part of C)
(D, E)
(Part of D)
(F)

IsWet = input()
if IsWet == 'yes':
braking_distance = braking_distance * 1.5
print(braking_distance)

(Part of C)
(Part of G)
(Part of G)
(H)

21

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

C# Example (fully correct)
All design marks are achieved (Marks A and B)
int intSpeed;
double braking_distance;
string IsWet;
intSpeed = int.Parse(Console.ReadLine());
while (intSpeed < 10 || intSpeed > 50)
{
intSpeed = int.Parse(Console.ReadLine());
}
braking_distance = (double)intSpeed / 5;
IsWet = Console.ReadLine();
if (IsWet == "yes")
{
braking_distance = braking_distance * 1.5;
}
Console.WriteLine(braking_distance);

(Part of C)
(D, E)
(Part of D)
(F)
(Part of C)
(Part of G)
(Part of G)
(H)

I. indentation in C#
VB Example (fully correct)
All design marks are achieved (Marks A and B)
Dim speed As Integer
Dim braking_distance As Decimal
Dim IsWet As String
speed = Console.ReadLine()
while speed < 10 Or speed > 50
speed = Console.ReadLine()
End While
braking_distance = speed / 5
IsWet = Console.ReadLine()
if IsWet = "yes" Then
braking_distance = braking_distance * 1.5
End If
Console.WriteLine(braking_distance)
I. indentation in VB.Net

22

(Part of C)
(D, E)
(Part of D)
(F)
(Part of C)
(Part of G)
(Part of G)
(H)

MARK SCHEME – GCSE COMPUTER SCIENCE – 8525/1 – SAMS

Python Example (partially correct – 7 marks)
All design marks are achieved (Marks A and B)
speed = float(input())
while speed <= 10 and speed > 50
speed = float(input())
braking_distance = speed / 5

(Part of C)
(D, NOT E)
(Part of D)
(F)

IsWet = input()
if IsWet = 'yes'
braking_distance = braking_distance * 1.5
print(braking_distance)

(Part of C)
(Part of G)
(Part of G)
(H)

Copyright information
AQA retains the copyright on all its publications. However, registered schools/colleges for AQA are permitted to copy material from this booklet for their own internal
use, with the following important exception: AQA cannot give permission to schools/colleges to photocopy any material that is acknowledged to a third party even for
internal use within the centre.

23

Advertisement