Official June 2024
AQA
AS
COMPUTER SCIENCE
7516/1
Paper 1
Merged Question Paper + Mark Scheme
Ace your Mocks!!!
IB/M/Jun24/G4001/E7 7516/1
Tuesday 14 May 2024 Afternoon Time allowed: 1 hour 45 minutes
Materials
For this paper you must have:
• a computer
• a printer
• appropriate software
• the Electronic Answer Document
• an electronic version and a hard copy of the Skeleton Program
• an electronic version and a hard copy of the Preliminary Material
• an electronic version of the Data File SimulationData.txt
You must not use a calculator.
Instructions
• Type the information required on the front of your Electronic Answer Document.
• Before the start of the examination make sure your Centre Number, Candidate Name and
Candidate Number are shown clearly in the footer of every page (not the front cover) of your
Electronic Answer Document.
• Enter your answers into the Electronic Answer Document.
• Answer all questions.
• Save your work at regular intervals.
Information
• The marks for questions are shown in brackets.
• The maximum mark for this paper is 75.
• No extra time is allowed for printing and collating.
• The question paper is divided into three sections.
Advice
You are advised to allocate time to each section as follows:
Section A – 20 minutes; Section B – 25 minutes; Section C – 60 minutes.
At the end of the examination
Tie together all your printed Electronic Answer Document pages and hand them to the Invigilator.
Warning
It may not be possible to issue a result for this paper if your details are not on every page of your
Electronic Answer Document.
AS
COMPUTER SCIENCE
Paper 1
2
IB/M/Jun24/7516/1
Section A
You are advised to spend no more than 20 minutes on this section.
Enter your answers to Section A in your Electronic Answer Document. You must save this
document at regular intervals.
Question 04 in this section asks you to write program code starting from a new
program/project/file.
You are advised to save your program at regular intervals.
0 1 Figure 1
S1 ← "011101"
S2 ← "001100"
C ← "0"
R ← ""
FOR J = 0 TO 5
X ← 5 - J
D1 ← S1[X]
D2 ← S2[X]
IF C = "0" THEN
IF D1 = D2 THEN
S ← "0"
C ← D1
ELSE
S ← "1"
ENDIF
ELSE
IF D1 = D2 THEN
S ← "1"
C ← D1
ELSE
S ← "0"
ENDIF
ENDIF
R ← CONCATENATE(S, R)
ENDFOR
OUTPUT R
The function CONCATENATE(X, Y) returns the string formed by concatenating the
string Y to the end of string X. For example, CONCATENATE("cat", "dog")
returns "catdog".
The strings are zero index based.
3
IB/M/Jun24/7516/1
Turn over ►
Complete Table 1 by hand-tracing the algorithm in Figure 1.
You may not need to use all the rows in Table 1.
You do not need to indicate that C, D1, D2 and S are strings.
The first row of Table 1 has already been completed for you.
Table 1
S1 S2 C R J X D1 D2 S
"011101" "001100" "0" ""
OUTPUT:
Copy the contents of all the unshaded cells in Table 1 into your Electronic
Answer Document.
[5 marks]
4
IB/M/Jun24/7516/1
0 2 A program uses both local and global variables.
0 2 . 1 State two differences between local and global variables.
[2 marks]
0 2 . 2 Give two reasons why it is good practice to use local variables.
[2 marks]
0 3 Programmers are encouraged to adopt a structured approach to writing programs.
Explain three reasons for adopting the structured approach.
[3 marks]
0 4 Figure 2 shows an algorithm represented using pseudo-code.
Figure 2
OUT_NOLF "Enter an integer: "
INPUT Number1
OUT_NOLF "Enter another integer: "
INPUT Number2
IF Number1 > Number2 THEN
Number ← Number1 DIV Number2
ELSE
Number ← Number2 DIV Number1
ENDIF
Count ← 0
WHILE Count ≠ Number
Count ← Count + 1
IF (Count MOD 10) = 0 THEN
OUT_NOLF "X"
ELSE
IF (Count MOD 5) = 0 THEN
OUT_NOLF "V"
ELSE
OUT_NOLF "/"
ENDIF
ENDIF
ENDWHILE
The OUT_NOLF command displays the output without a line feed. The following series
of OUT_NOLF commands will display ABC:
OUT_NOLF "A"
OUT_NOLF "B"
OUT_NOLF "C"
5
IB/M/Jun24/7516/1
Turn over ►
Table 2 lists the MOD and DIV operators for each of the available programming
languages. You should refer to the row for your programming language.
Table 2
Programming language MOD DIV
C# % /
Java % /
Pascal mod div
Python % //
VB.NET Mod \
What you need to do:
Task 1
Write a program to implement the algorithm in Figure 2.
Task 2
Test that your program works:
• run your program
• enter 4
• enter 99
Evidence that you need to provide
Include the following evidence in your Electronic Answer Document.
0 4 . 1 Your PROGRAM SOURCE CODE for Task 1.
[8 marks]
0 4 . 2 SCREEN CAPTURE(S) showing the test described in Task 2.
[1 mark]
6
IB/M/Jun24/7516/1
Section B
You are advised to spend no more than 25 minutes on this section.
Enter your answers to Section B in your Electronic Answer Document. You must save this
document at regular intervals.
These questions refer to the Preliminary Material and the Skeleton Program, but do not require
any additional programming.
Refer either to the Preliminary Material issued with this question paper or your electronic copy.
0 5 . 1 State the most appropriate data type to use for numbers with a fractional part, for
example 12.79.
[1 mark]
0 5 . 2 State the identifier of a variable in the Skeleton Program that is used to hold a number
with a fractional part.
[1 mark]
0 6 . 1 State the most appropriate data type to use for values that may consist of more than
one character.
[1 mark]
0 6 . 2 State the identifier of a variable in the Skeleton Program that is used to hold more
than one character.
[1 mark]
0 7 State the name of an identifier for a subroutine defined in the Skeleton Program that
returns a single digit number.
[1 mark]
0 8 This question refers to the subroutine CalculateServingTime.
Explain the reason for adding the value 1 to the result of dividing NoOfItems by
TILL_SPEED.
[1 mark]
0 9 This question refers to the subroutine QueueSimulator.
Why might the subroutine Serving be called repeatedly after the specified time for
the simulation has finished?
[2 marks]
7
IB/M/Jun24/7516/1
Turn over ►
1 0 The Skeleton Program uses a number of data structures.
1 0 . 1 State the identifier of a data structure that stores values of a user-defined data type.
[1 mark]
1 0 . 2 State the identifier of a data structure that stores values of only one built-in data type.
[1 mark]
1 1 . 1 Explain what is meant by composition and give an example where composition is used
in the Skeleton Program.
[2 marks]
1 1 . 2 Describe two reasons why composition is used in the Skeleton Program.
[2 marks]
1 2 What is the named constant TIME_SERVING used for and what is the benefit of using
a named constant in this way?
[2 marks]
1 3 This question refers to the subroutine ServeBuyer.
1 3 . 1 Describe the purpose of the statements within the FOR loop.
[2 marks]
1 3 . 2 What aspect of a shop do the FOR loop and the statements inside it simulate?
[1 mark]
1 4 One of the statistics calculated is average queue length.
This is calculated using the data structure Stats.
1 4 . 1 Describe how some of the values in Stats are used to calculate the average queue
length in the subroutine OutputStats.
[1 mark]
1 4 . 2 Describe how the relevant values in Stats are updated in the subroutine Serving to
enable the calculation in the subroutine OutputStats to produce the correct result.
[2 marks]
1 5 In the Skeleton Program buyers join a single queue and are then served at one of
several tills.
Outline the design changes needed for buyers to form a separate queue for each till.
You are not expected to actually make the changes.
[2 marks]
Category | AQA PAPERS AND MARK SCHEME |
Comments | 0 |
Rating | |
Sales | 0 |