Past-paper question · 2025 May-June · Paper 23 · Q8

Question 8 2025 · May-June · Paper 23 · 15 marks

Original past-paper question for 8
Original past-paper question for 8
Original past-paper question for 8
Original past-paper question for 8
Reveal official mark-scheme answer Official mark-scheme answer for 8

Official answer for Question 8

✓
Marks are available for:

Question 15

✓
•
✓
AO2 (maximum 9 marks)
✓
•
✓
AO3 (maximum 6 marks)
✓
Data Structures required with names as given in the scenario:
✓
Arrays or lists Video[], Results[]
✓
Requirements (techniques)
✓
R1 initialises arrays, displays menu and allows choice, then proceeds based on valid choice, (nested iteration, input,
✓
output, selection, validation).
✓
R2 enters data and stores into array at first available location. The code allows for additional data to be input, as required.
✓
(counting, selection, input, storage, iteration if selected).
✓
R3 finds specific data based on user input and outputs results. Appropriate output messages, including if video not found.
✓
Program continues until stopped by user.
✓
(input, output, linear search, iteration).
✓
0478/23
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2025
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks
✓
Example 15-mark answer in pseudocode
✓
//Array and variable declarations not required in responses
✓
//Initialisation of Video array
✓
FOR Index1 1 TO 10000
✓
FOR Index2 1 TO 4
✓
Video[Index1, Index2] ""
✓
Next Index2
✓
NEXT Index1
✓
//Display of menu choices
✓
REPEAT
✓
OUTPUT "Enter 1 to input data for a new video, 2 to search for a video title, or 3 to stop"
✓
//Input menu choice with validation of input
✓
REPEAT
✓
INPUT Answer
✓
IF Answer <> 1 AND Answer <> 2 AND Answer <> 3
✓
THEN
✓
OUTPUT "You must input 1, 2 or 3, please try again"
✓
ENDIF
✓
UNTIL Answer = 1 OR Answer = 2 OR Answer = 3
✓
//User chooses to input data for a new video title
✓
IF Answer = 1
✓
THEN
✓
Store 1
✓
//Finding the next available space in the array
✓
REPEAT
✓
IF Video[Store, 1] <> ""
✓
THEN
✓
Store Store + 1
✓
ENDIF
✓
UNTIL Video[Store, 1] = ""
✓
//Data entry and storage until user says no more needed
✓
REPEAT
✓
OUTPUT "Enter the title"
✓
INPUT Video[Store, 1]
✓
OUTPUT "Enter the format (4K for 4K, BD for Blu-ray, DV for DVD, DG for Digital"
✓
INPUT Video[Store, 2]
✓
OUTPUT "Enter the year of release"
✓
INPUT Video[Store, 3]
✓
0478/23
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2025
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks
✓
OUTPUT "Enter the storage code"
✓
INPUT Video[Store, 4]
✓
Store Store + 1
✓
OUTPUT "Another video (Y or N)?"
✓
INPUT Another
✓
UNTIL Another = 'N' OR Another = 'n'
✓
ENDIF
✓
//User chooses to search for a video title
✓
IF Answer = 2
✓
THEN
✓
REPEAT
✓
//Initialisation of Results array
✓
FOR Index1 1 TO 20
✓
FOR Index2 1 TO 4
✓
Results[Index1, Index2] ""
✓
NEXT Index2
✓
NEXT Index1
✓
//User inputs their search criterion
✓
OUTPUT "State the title of the video you want"
✓
INPUT Title
✓
Search 1
✓
Store 1
✓
//Searching for the title
✓
REPEAT
✓
//If found, data copied to Results array
✓
IF Video[Search, 1] = Title
✓
THEN
✓
FOR Index1 1 TO 4
✓
Results[Store, Index1] Video[Search, Index1]
✓
NEXT Index1
✓
//Search and Store indexes incremented
✓
Search Search + 1
✓
Store Store + 1
✓
ELSE
✓
//Search index incremented
✓
Search Search + 1
✓
ENDIF
✓
0478/23
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2025
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks
✓
//Search ends when no more data in Video array,
✓
//or end of Video array reached.
✓
UNTIL Video[Search, 1] = "" OR Search = 10000
✓
//Outputting only results found from Results array
✓
IF Results[1, 1] <> ""
✓
THEN
✓
OUTPUT "The results: "
✓
FOR Index1 1 TO Store – 1
✓
FOR Index2 1 TO 4
✓
OUTPUT Results[Index1, Index2]
✓
NEXT Index2
✓
NEXT Index1
✓
ELSE
✓
//Feedback to user if item not found
✓
OUTPUT "Item not found"
✓
ENDIF
✓
//Another search offered
✓
OUTPUT "Another search (Y or N)?"
✓
INPUT Another
✓
UNTIL Another = 'N' OR Another = 'n'
✓
ENDIF
✓
UNTIL Answer = 3

Mark scheme 0478_s25_ms_23.pdf →

Show text version of question

Question 8

A
collector needs a video library system for a collection of videos stored on 4K Blu-ray discs,

standard Blu-ray discs, DVD, or as digital downloads.

The two-dimensional (2D) array Video[] is used to store, for each video item, the title, the format of the video (4K Blu-ray disc, standard Blu-ray disc, DVD, or digital download), the year it was released stored as a string and a storage code to represent where the video can be found in the collection, for example:

Video[1,1] is "Macbeth" Video[1,2] is "digital download" Video[1,3] is "2015"

Video[1,4] is "DG276"

The two-dimensional (2D) array Results[] is used to store the results of a search to find a specific video. The search uses the video title, and if the video is found, its data is copied from the array Video[] to the array Results[]. The search continues and if other videos with the same title are found, this data is also copied to the array Results[]. The search ends when the end of the data is reached.

Write a program that meets the following requirements:

  • The video library array needs to be initialised with the null string (""), allowing for up to

10 000 records. The array Results[] must be initialised before every search with the null

string and must be able to hold up to 20 search results with the same title.

  • Create a menu to add a new video to the library to search for an existing video by title, or to
  • stop, with validation of the input.

  • When the user enters a new video, the following data is stored in the first available location of
  • the relevant array: o video title o format (4K Blu-ray disc, standard Blu-ray disc, DVD, digital download) o year of release as string o storage code.

  • Allow input of data for another video if required.
  • When searching for an existing video, if a match is found, transfer all the data for that video

into the array Results[], and continue to search until all videos with the same title have been found.

  • Output the results from the array Results[]
  • If the video title is not found, output a suitable message.
  • The system returns to the menu after completing the input or the output, until the user

chooses to stop.

You must use pseudocode or program code and add comments to explain how your code works.

You do not need to declare any arrays, variables or constants. You may assume that this has already been done.

All inputs and outputs must contain suitable messages.

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

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

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

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

Question 13

, ,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Question 14

, ,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[15]

,

,

Question 15

Question 16

, ,

reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

Topic relevance

Why this question appears here

98% assigned-topic match · Programming › Arrays

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 0478_s25_qp_23.pdf

Keep practising this topic