Past-paper question · 2019 May-June · Paper 23 · Q2(a)

Question 2(a) 2019 · May-June · Paper 23 · 5 marks

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

Official answer for Question 2

Part (a)

✓
One mark for each point:

Question 5

✓
•
✓
Initialise a count to zero
✓
•
✓
loop 100 times // loop through all of the array
✓
•
✓
compare an element with "Empty" in a loop
✓
•
✓
increment the count if equal in a loop
✓
•
✓
Output a message together with the count not inside a loop

Mark scheme 9608_s19_ms_23.pdf →

Show text version of question

Question 2

Part (a)

A
student is learning about arrays. She wants to write a program to:
  • search through a 1D array of 100 elements
  • count the number of elements that contain the string “Empty”
  • output the number of elements containing “Empty” together with a suitable message.

Use structured English to describe the algorithm she could use.

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

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

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

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

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

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

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

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

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

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

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

[5]
Topic relevance

Why this question appears here

86% assigned-topic match · Data types and structures › 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 9608_s19_qp_23.pdf

Keep practising this topic