Past-paper question · 2025 May-June · Paper 23 · Q5(b)

Question 5(b) 2025 · May-June · Paper 23 · 24 marks

Original past-paper question for 5(B)
Original past-paper question for 5(B)
Original past-paper question for 5(B)
Original past-paper question for 5(B)
Reveal official mark-scheme answer

The answer for this question is in the official mark scheme: open the mark scheme.

Mark scheme 9618_s25_ms_23.pdf →

Show text version of question

Question 5

Part (b)

Question 5

"Uranus"

[3]

(ii)

The variable StartPointer contains the index of the first item in the linked list.

State the value of the variable StartPointer

.....................................................................................................................................

[1]

Part (c)

A third program is also being created to manage a queue.

Describe two features of a queue.

Feature one ..............................................................................................................................

...................................................................................................................................................

Feature two ...............................................................................................................................

...................................................................................................................................................

[2]

Question 7

, ,

3 A programmer has been asked to create a module RollDice() to simulate multiple rolls of a dice. This module will be used as part of a program for a game.

The module will:

step 1 – take a positive integer parameter representing the number of times the dice will be rolled

step 2 – simulate one roll of the dice by generating a random integer between 1 and 6 inclusive

step 3 – output the integer generated

step 4 – repeat, as required from step 2

step 5 – calculate the average value of the random integers generated

step 6 – return the average value.

Write pseudocode for the module RollDice()

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

....................................................................................................................................................

[7]

Question 8

, ,

4 A programmer is developing a new stock control program for a shop owner to produce sales reports.

Part (b)

Once the program has been completed, it is tested using the walkthrough method.

Describe the walkthrough method and explain how it can be used to identify errors.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................

[3]

Question 10

, ,

5 A module Parity() takes a string as a parameter. The parameter has the identifier BitString and it represents a binary value.

The module will concatenate a single character to the end of BitString by applying one of the two rules:

  • '0' if Bitstring contains an even number of 1s
  • '1' if Bitstring contains an odd number of 1s.

The modified value of BitString is then returned.

For example:

Parameter String returned Explanation "0010010110" "00100101100" there are an even number of 1s in the string passed to Parity() so a '0' is concatenated to the end of BitString "101010" "1010101" there are an odd number of 1s in the string passed to Parity() so a '1' is concatenated to the end of BitString

Write pseudocode for the module Parity()

Assume the parameter BitString can only contain the characters '0' and '1'

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Question 11

, ,

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

....................................................................................................................................................

[8]

Question 12

, ,

Topic relevance

Why this question appears here

71% assigned-topic match · Programming › Constructs

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9618_s25_qp_23.pdf

Keep practising this topic