Question 2(b) 2013 · October-November · Paper 23 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 2
Part (b)
Part (b)
Show text version of question
Question 2
Part (b)
Part (b)
Part of Ashvin’s program will involve comparing equipment names, such as “cable” and For
“capacitor”. Examiner's Use
The flowchart outputs the two words in alphabetical order.
Complete the flowchart using the statements in the box below.
START
1 OUTPUT Word1, Word2 INPUT 2 OUTPUT Word2, Word1 Word1, Word2 3 Index ← Index + 1 4 Index ← 1 5 Word1[Index] < Word2[Index]? 6 Length(Word1) < Index?
Word1[Index] = No No Word2[Index] ?
Yes Yes
Yes
No
Yes OUTPUT Length(Word2) < Index? Word2, Word1
No
STOP
Question 8
Why this question appears here
71% assigned-topic match · Programming › Programming basics
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 9691_w13_qp_23.pdf
