Question 1(b)(ii) 2019 · October-November · Paper 22 · 4 marks
Reveal official mark-scheme answer
Official answer for Question 1
Part (b)
(ii)
Question 4
Question 6
Show text version of question
Question 1
Part (b)
(ii)
Question 1
Study the following pseudocode.
PROCEDURE FillTank()
DECLARE Tries : INTEGER DECLARE Full : BOOLEAN
Tries 1
Full ReadSensor("F1")
IF NOT Full THEN WHILE NOT Full AND Tries < 4 CALL TopUp() Full ReadSensor("F1") Tries Tries + 1 ENDWHILE IF Tries > 3 THEN OUTPUT "Too many attempts" ELSE OUTPUT "Tank now full" ENDIF ELSE OUTPUT "Already full" ENDIF
ENDPROCEDURE
(ii)
Evaluate each expression in the following table.
If an expression is invalid then write ‘ERROR’.
Refer to the Appendix on page 18 for the list of built-in functions and operators.
Expression Evaluates to
RIGHT("Stop", 3) & LEFT("ich", 2)
MID(NUM_TO_STRING(2019), 3, 1)
INT(NUM_TO_STRING(-273.16))
INT(13/2)
Question 5
Why this question appears here
71% assigned-topic match · Programming › Constructs
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_w19_qp_22.pdf
