Computer Science (AS & A Level) · May / June 2025 · Paper 41 · Question 2
9618
As printed in the paper
The question as text
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.
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
2(a)[7]
2(b)[6]
2(c)[5]
2(d)[2]
2(e)(i)[3]
2(e)(ii)[2]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

