Question 2(b) 2017 · October-November · Paper 22 · 9 marks
Reveal official mark-scheme answer
Official answer for Question 2
Part (b)
- One mark for START and STOP / END
- One mark for each bracketed pair
- One mark for each of other labelled symbol (decision box shape must be correct)
- Allow F/T from incorrect decision symbol
Show text version of question
Question 2
Part (b)
Question 2
A 1D array, ClassName, of type STRING contains 100 elements.
The following pseudocode represents a simple algorithm to process the array.
DECLARE SearchValue : STRING DECLARE FoundFlag : BOOLEAN DECLARE Index : INTEGER
INPUT SearchValue FoundFlag FALSE Index 1
WHILE Index < 101 AND FoundFlag = False IF ClassName[Index] = SearchValue THEN OUTPUT Index FoundFlag TRUE ENDIF Index Index + 1 ENDWHILE
IF FoundFlag = FALSE THEN OUTPUT "Not found" ENDIF
Part (b)
Draw a program flowchart to represent this algorithm.
Note that variable declarations are not required in program flowcharts.
Question 8
Why this question appears here
71% assigned-topic match · Algorithm design and problem-solving › Algorithms
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_w17_qp_22.pdf
