A Level Computer Science 9618 Paper 21, May/June 2026

Question paper and mark scheme75 marks9 questions

Solve it on ExamPal

Practise

Untimed. Write on the paper and check as you go.

Start

Exam

Timed, with a clock you set, like sitting the real paper.

Start

Opens full screen.

Opening the question paper

Read as textThe questions and the mark scheme as plain text. Easier to read on a phone.

Question paper

9618/21 · May/June 2026

Download PDF
1

Study this pseudocode: FOR i ← 3 TO 12 STEP 3 OUTPUT i, i * i NEXT i

a

Identify the type of construct used in this pseudocode.

[1]
b

State how many iterations are performed by this pseudocode.

[1]
2

A washing machine contains: • two trays for the washing powder • a user interface display • five sensors. The washing machine control program includes the following variables: variable | description MainsOn | TRUE when the mains power is on WaterOn | TRUE when the water supply to the machine is turned on DisplayOn | TRUE when the user interface display is active Tray1 | TRUE when it detects washing powder in tray 1 Tray2 | TRUE when it detects washing powder in tray 2

a(i)

Identify the data type used for the five variables.

[1]
a(ii)

The display is only active when both the mains power is on and the water supply is turned on. Complete the pseudocode statement. DisplayOn ← ...........................................................................................................

[1]
a(iii)

The washing machine control program will start when a new variable WashStart is assigned the value TRUE WashStart is assigned the value TRUE when the mains power is switched on and there is washing powder in tray 1 or tray 2 or both trays. Write the pseudocode statement for the given description.

[3]
b(i)

The user will select from three possible wash options. The pseudocode for the washing machine program contains a procedure WashCycle() PROCEDURE WashCycle() // declaration of variables has been omitted // TimeSoFar is a global variable which changes // as the procedure is executed Finished ← FALSE TimeSoFar ← 0.0 OUTPUT "Option (1/2/3)" INPUT OptionNumber CASE OF OptionNumber: // WashTime is the total wash time in minutes 1 : WashTime ← 60 2 : WashTime ← 90 3 : WashTime ← 120 ENDCASE WHILE Finished = FALSE TimeRemaining ← WashTime - INT(TimeSoFar) ... ENDWHILE ENDPROCEDURE The programmer uses an Integrated Development Environment (IDE) to develop and run the washing machine program. State the IDE feature to display the current value for any variable during the execution of the program.

[1]
b(ii)

When option 3 is selected, the programmer interrupts execution when the TimeSoFar is 17.6 minutes. State the current value for TimeRemaining

[1]
3

A business operates five call centres. The software currently in use in each call centre is to be replaced; a new system will be developed by a software company.

a

The analysis stage included a feasibility study. State three other activities carried out during the analysis stage. 1 ................................................................................................................................................ ................................................................................................................................................... 2 ................................................................................................................................................ ................................................................................................................................................... 3 ................................................................................................................................................ ...................................................................................................................................................

[3]
b

The analysis stage has ended. Complete the statements about the development of the new system. Before any programming is started, the .................................................. stage for the proposed new system must be completed. For this large project, the tasks will be broken down into several .................................................. ; each will be coded by a different programming team. Once each team has completed its work, .................................................. testing must be carried out. Before the new system is delivered to the business, .................................................. testing will be carried out in-house. It is decided to install the software initially in only one of the call centres where .................................................. testing will be carried out. The new software is finally rolled out to all five call centres. In the first week of its use, staff report that the software still requires extra features which were not originally agreed. The software is withdrawn until .................................................. maintenance is completed.

[6]
4

An algorithm is expressed as: • A user inputs a sequence of integer values. • The process will calculate the number of positive integers. • The user will input value 0 to indicate there are no more numbers to be input. • Output the number of positive integers after the terminating 0 is input. Write a structured English description for this algorithm as a sequence of steps. Do not include pseudocode statements in your description. Your answer might not require all six steps shown.

[4]
5

Electric light bulbs are advertised online with the price showing: $1.75 each or 20 bulbs for $30.00 A pseudocode function BulbCost() • takes the quantity of bulbs purchased as its single parameter • returns the total cost in dollars. Pseudocode for the main program: • inputs the number of bulbs purchased • returns the total cost from the function BulbCost() • outputs the total cost.

a

Write pseudocode for the function BulbCost()

[4]
b

The main program accepts a user input for the quantity of bulbs purchased and calls function BulbCost() Complete the pseudocode for the main program. // Main program DECLARE NumberPurchased : INTEGER DECLARE TotalCost : REAL OUTPUT "How many bulbs? " INPUT NumberPurchased TotalCost ← ....................................................................................................................... OUTPUT '$' , TotalCost // end main program

[1]
6

Fence parts are manufactured by a number of similar machines. The length of the part must fall within a certain range. Parts not within the length range are rejected. The data for each rejected part forms a data packet made up of three data items, each separated by the ‘/’ character delimiter. The format of a data packet is: <length>/<machine ID>/<description of the fault> • The length is 3 digits (in millimetres). • The machine ID is a single character (‘A’, ‘B’, or ‘C’). • The description of the fault is a variable length string. A pseudocode program will process the data for several data packets. The program contains the statement: DataPacket ← "563/B/the fence length is too long"

a

Complete the two pseudocode expressions which extract the appropriate data item. PartLength ← ..................................................................................................................... MachineID ← .......................................................................................................................

[2]
b

The program will create a module RejectDescription() to return the fault description. Write the pseudocode for the module RejectDescription()

[4]
c

The data packets for all rejected parts are saved in this format in a text file Rejects.txt. The file stores one data packet per line. Write pseudocode to: • find all the rejected parts with a length greater than 560 millimetres and that were produced on machine ‘B’ or machine ‘C’ • output the description for each matching rejected part. Your pseudocode will include a module call to RejectDescription() and the answers given for 6(a).

[6]
7

Different data structures will be suitable for different computing applications.

a(i)

Identify a computing application where a queue data structure is suitable.

[1]
a(ii)

Justify why a queue is suitable for your application identified in 7(a)(i).

[2]
b(i)

A programmer designs a circular queue. • The data items are stored in a 1D array, MyQueue • The queue is managed using two pointers. The diagram shows the circular queue populated with four items. MyQueue 1 "PIG" ← Front 2 "DOG" 3 "RAT" 4 "SPIDER" ← Rear 5 6 7 8 Write three pseudocode declaration statements to implement this circular queue. 1 ........................................................................................................................................ 2 ........................................................................................................................................ 3 ........................................................................................................................................

[2]
b(ii)

Two program modules are available to add and remove items to and from the queue. module | description EnQueue(<value>) | when <value> is added to the queue DeQueue() | when an item is removed from the queue Complete the state of MyQueue after the following sequence of changes: • DeQueue() • EnQueue("HORSE") • EnQueue("CAT") MyQueue 1 2 3 4 5 6 7 8

[2]
b(iii)

On a different occasion, the state of MyQueue is: MyQueue 1 2 3 4 "LION" ← Front 5 "GIRAFFE" 6 "TIGER" 7 "ANT" ← Rear 8 Complete the state of MyQueue after the following sequence of changes: • EnQueue("GERBIL") • EnQueue("MONKEY") • EnQueue("SNAKE") • DeQueue() MyQueue 1 2 3 4 5 6 7 8

[2]
c

MyQueue will be initially empty. Write a pseudocode procedure InitialiseQueue() to set up the empty MyQueue, using a loop. The initial array contents will be set to empty strings. You are not required to repeat the declaration statements in 7(b)(i). PROCEDURE InitialiseQueue() ................................................................................................................................................... ENDPROCEDURE

[3]
8

Global array MyData contains the values shown. Study the pseudocode algorithm and array MyData FUNCTION MyTrace(Target : INTEGER) RETURNS INTEGER DECLARE LeftPointer, RightPointer, MidPointer : INTEGER LeftPointer ← 1 RightPointer ← 15 WHILE LeftPointer <= RightPointer MidPointer ← (LeftPointer + RightPointer) DIV 2 IF MyData[MidPointer] = Target THEN OUTPUT "Found " & NUM_TO_STR(MidPointer) RETURN MidPointer ELSE IF Target > MyData[MidPointer] THEN LeftPointer ← MidPointer + 1 ELSE RightPointer ← MidPointer - 1 ENDIF ENDIF ENDWHILE OUTPUT "Not found" RETURN -1 ENDFUNCTION MyData: 1: 2, 2: 8, 3: 9, 4: 12, 5: 13, 6: 15, 7: 18, 8: 19, 9: 20, 10: 23, 11: 25, 12: 26, 13: 39, 14: 38, 15: 40

a

Complete the trace table for the function MyTrace when the following pseudocode statement is executed. Result ← MyTrace(15) LeftPointer | RightPointer | MidPointer

[4]
b

Give the output.

[1]
c

Give the value assigned to Result

[1]
9

A hotel has three floors numbered 0 to 2 (floor 0 is the ground floor). There are 15 rooms on each floor. The hotel gets many enquiries from customers to check if a room is available that day. The availability data for that day is stored in a 2D array Version1 • The first index is the floor number. • The second index is the room number. • On each of the three floors, the room numbers are 1 to 15. Each cell of the array stores either: • ‘A’ – the room is available • ‘B’ – the room is already booked.

Figure 1 of 3 for question 9
Figure 2 of 3 for question 9
Figure 3 of 3 for question 9
a

Write the declaration statement for the 2D array Version1

[2]
b

An enquiry program will: • input a floor number • output all room numbers that are available on that floor • output the number of rooms that are available. The output must be in the format shown in the two examples. A wheelchair user makes an enquiry. She requires a room on the ground floor only. Example program outputs: Floor number: 0 0 room(s) available There are no available rooms on the ground floor. Floor number: 0 7 11 2 room(s) available Shows two rooms available on the ground floor: • rooms 7 and 11. Write pseudocode for this enquiry program.

[6]
c(i)

Customers are becoming more selective with their enquiries when searching for an available room. A new program design is required. It will create a record to define the data for a room. Each room: • may have a sea view • is classified as: single room (‘S’), double room (‘D’) or family room (‘F’) • is either standard (‘ST’) or deluxe (‘DL’). Complete the pseudocode. TYPE RoomData ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ........................................................................................................................................... ...........................................................................................................................................

[3]
c(ii)

The room data is stored in a 2D array Version2 of type RoomData The new enquiry program uses this new data design and will: • input the three customer requirements • output the floor number(s) and room number(s) for all matching available rooms. Example program output: Room type – S/D/F ? F View – True/False ? False Room grade – ST/DL ? DL Matching floor number and room number: 0 4 0 5 The customer asks for a deluxe family room; no need for a sea view. The new enquiry program has found two matching rooms on the ground floor. Write pseudocode for the new enquiry program.

[7]

Mark scheme

9618/21 · May/June 2026

Download PDF

1a · 1 mark

  • 1 mark

    Count-control(led) loop // Count-control(led) iteration

1b · 1 mark

  • 1 mark

    4

2a(i) · 1 mark

  • 1 mark

    BOOLEAN

2a(ii) · 1 mark

  • 1 mark

    MainsOn (= TRUE) AND WaterOn (= TRUE) / Or reverse order …

2a(iii) · 3 marks

  • 1 mark

    MainsOn AND

  • 1 mark

    (Tray1 OR Tray2)

  • 1 mark

    WashStart ← TRUE (or equivalent assignment / structure)

2b(i) · 1 mark

  • 1 mark

    Report window // Watch window

2b(ii) · 1 mark

  • 1 mark

    103

3a · 3 marks

  • 1 mark

    Investigate the current system /any example // investigate any other similar systems

  • 1 mark

    Discussion/interviews with managers

  • 1 mark

    Discussion/interviews with staff who operate the system

  • 1 mark

    Carry out a survey of employees/customers // carry out a focus group of employees/customers

  • 1 mark

    Observe the current system in use

  • 1 mark

    Produce the requirements specification

  • 1 mark

    Decide on the (program development) life cycle to be used

3b · 6 marks

  • 1 mark

    DESIGN

  • 1 mark

    MODULES // SUB-TASKS

  • 1 mark

    INTEGRATION // UNIT

  • 1 mark

    ALPHA

  • 1 mark

    BETA

  • 1 mark

    ADAPTIVE

4 · 4 marks

  • 1 mark

    Initialise Count to zero and later evidence of use of counter

  • 1 mark

    Conditional loop and terminated when 0 is input

  • 1 mark

    Test for number > 0 and increment count inside the loop

  • 1 mark

    Output the count (either ‘sum’ or ‘count’)

5a · 4 marks

  • 1 mark

    Function header and single parameter and returns REAL and end

  • 1 mark

    Declaration of required local variable(s)

  • 1 mark

    Correct calculation of ‘multiples of 20’ and ‘other’ amounts using MOD and DIV // alternative method

  • 1 mark

    Cost is returned

5b · 1 mark

  • 1 mark

    TotalCost ← BulbCost(NumberPurchased)

6a · 2 marks

  • 1 mark

    LEFT(DataPacket, 3) // MID(DataPacket, 1, 3)

  • 1 mark

    MID(DataPacket, 5, 1)

6b · 4 marks

  • 1 mark

    Function header and end function (and string parameter)

  • 1 mark

    Calculation for description expression (part 1) using MID/RIGHT

  • 1 mark

    Calculation for description expression (part 2) using the LENGTH function

  • 1 mark

    Return of a calculated value and RETURN STRING in the header

6c · 6 marks

  • 1 mark

    OPENFILE in READ mode and CLOSEFILE

  • 1 mark

    Conditional loop - terminates when EOF("Rejects.txt")

  • 1 mark

    READFILE – with correct syntax

  • 1 mark

    ‘Attempted’ isolation of length and machine data

  • 1 mark

    IF STR_TO_NUM(ThisLength) > 560 AND (ThisMachine = ‘B‘ OR ThisMachine = ‘C‘)

  • 1 mark

    OUTPUT of return value from RejectDescription() inside the loop

7a(i) · 1 mark

  • 1 mark

    Printer queue on a computer network // modelling/simulation of a real-world problem using a queue //accept anything reasonable

7a(ii) · 2 marks

  • 1 mark

    First in – first out ‘feel’

  • 1 mark

    Must refer to their application stated in part (i)

7b(i) · 2 marks

  • 1 mark

    DECLARE MyQueue : ARRAY [1:8] OF STRING

  • 1 mark

    DECLARE Front : INTEGER DECLARE Rear : INTEGER

7b(ii) · 2 marks

  • 1 mark

    Correct sequence of five values in locations 2–6

  • 1 mark

    Front points to DOG in location 2 and Rear points to CAT in location 6

7b(iii) · 2 marks

  • 1 mark

    MONKEY and SNAKE in locations 1, 2 with correct Rear pointer

  • 1 mark

    GIRAFFE in 5 with Front pointer and TIGER, ANT, GERBIL in locations 6, 7 and 8

7c · 3 marks

  • 1 mark

    Front and Rear are each assigned a value in range

  • 1 mark

    Correct FOR-NEXT loop // other loop structure

  • 1 mark

    MyQueue[i] assigned an empty string in a loop

8a · 4 marks

  • 4 marks

    Correct trace table entries: LeftPointer (1, then 5), RightPointer (15, 7), MidPointer (8, 4, 6)

8b · 1 mark

  • 1 mark

    Found 6

8c · 1 mark

  • 1 mark

    6

9a · 2 marks

  • 1 mark

    DECLARE Version1 : ARRAY [0:2, 1:15]

  • 1 mark

    OF CHAR

9b · 6 marks

  • 1 mark

    Declaration of all integer variables

  • 1 mark

    Input of the floor number (with prompt)

  • 1 mark

    Loop for 15 iterations

  • 1 mark

    Test array element to check if room is ‘available’?

  • 1 mark

    Initialisation and increment of count and Output room number

  • 1 mark

    Output of the final count line including the message outside the loop

9c(i) · 3 marks

  • 1 mark

    Two variables correct

  • 1 mark

    Three variables correct

  • 1 mark

    ENDTYPE

9c(ii) · 7 marks

  • 1 mark

    Three correctly formed INPUT statements each with a prompt

  • 1 mark

    OUTPUT of the “Matching floor etc” heading

  • 1 mark

    Outer FOR loop / or other (for the floors)

  • 1 mark

    Inner FOR loop / or other (for the rooms)

  • 1 mark

    Correct use of array with dot notation with at least one data item inside loop

  • 1 mark

    ‘Attempt’ to combine all three tests (room type, view, grade) inside loop

  • 1 mark

    Output of floor and room inside loop

Questions

  1. 1
    Question 12 marks
    Mark scheme ›
  2. 2
    Question 27 marks
    Mark scheme ›
  3. 3
    Question 39 marks
    Mark scheme ›
  4. 4
    Question 44 marks
    Mark scheme ›
  5. 5
    Question 55 marks
    Mark scheme ›
  6. 6
    Question 612 marks
    Mark scheme ›
  7. 7
    Question 712 marks
    Mark scheme ›
  8. 8
    Question 86 marks
    Mark scheme ›
  9. 9
    Question 918 marks
    Mark scheme ›

More 9618 papers

Other papers from May/June 2026

Solve it on ExamPalStart