Past-paper question · 2025 May-June · Paper 41 · Q2(e)(i)

Question 2(e)(i) 2025 · May-June · Paper 41 · 3 marks

Original past-paper question for 2(E)(I)
Original past-paper question for 2(E)(I)
Original past-paper question for 2(E)(I)
Reveal official mark-scheme answer Official mark-scheme answer for 2(E)(I)

Official answer for Question 2

Part (e)

(i)

Question 1

mark each

Question 3

  • Calling ReadData() …
  • … and storing/using return value
  • Calling SplitData() with returned array as a parameter
✓
Example program code:
✓
Python
✓
DataFromFile = ReadData()
✓
SplitData(DataFromFile)
✓
VB.NET
✓
Sub Main(args As String())
✓
Dim DataFromFile(,) As String = ReadData()
✓
SplitData(DataFromFile)
✓
End Sub
✓
Java
✓
public static void main(String args[]){
✓
String[][] DataFromFile = ReadData();
✓
SplitData(DataFromFile);
✓
}

Mark scheme 9618_s25_ms_41.pdf →

Show text version of question

Question 2

Part (e)

(i)

Question 2

A program reads data from a text file, splits the data depending on its content and stores the

separated data into different files.

The text file TheData.txt contains 72 lines of data. Each line of data has an integer number and a string colour that are separated by a comma. For example, the first line in the file is:

10,red

The integer is 10 and the string is "red"

The file contains six different colours: red, green, blue, orange, yellow, pink. The main program calls ReadData() and then SplitData()

(i)

Write program code for the main program.

Save your program.

Copy and paste the program code into part 2(e)(i) in the evidence document.

[3]
Topic relevance

Why this question appears here

76% assigned-topic match · Data types and structures › Files

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_41.pdf

Keep practising this topic