Past-paper question · 2019 May-June · Paper 22 · Q5(a)

Question 5(a) 2019 · May-June · Paper 22 · 3 marks

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

Official answer for Question 5

Part (a)

✓
One mark for each of:

Question 3

✓
•
✓
Open the file
✓
•
✓
Set a count to zero
✓
•
✓
Loop until end of file // no more lines to read
✓
•
✓
Increment the count each time a line is read in a loop
✓
Maximum 3 marks

Mark scheme 9608_s19_ms_22.pdf →

Show text version of question

Question 5

Part (a)

Question 5

A student is learning about text files. She wants to write a program to count the number of lines in

a file.

Part (a)

Use structured English to describe an algorithm she could use.

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

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

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

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

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

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

[3]

Question 11

Topic relevance

Why this question appears here

86% 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 9608_s19_qp_22.pdf

Keep practising this topic