Past-paper question · 2020 October-November · Paper 23 · Q2(a)

Question 2(a) 2020 · October-November · Paper 23 · 4 marks

Original past-paper question for 2(A)
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)

✓
Line 1/2/8/12

Question 4

✓
Line 3 and/or 14
✓
Line 8/12
✓
Line 6/10/15/19

Mark scheme 2210_w20_ms_23.pdf →

Show text version of question

Question 2

Part (a)

Question 2

An algorithm has been written in pseudocode to check the temperature readings taken from a

freezer are within the range –18 degrees to –25 degrees inclusive.

The algorithm counts the number of times that the temperature reading is below –25 degrees and the number of times that the temperature reading is above –18 degrees.

An engineer is called if there are more than 10 temperature readings below –25 degrees.

An alarm sounds if there are more than 5 temperature readings above –18 degrees.

01 TooHot 0 02 TooCold 1000 03 REPEAT 04 OUTPUT "Please enter temperature" 05 INPUT Temperature 06 IF Temperature < -25 07 THEN 08 TooCold TooCold – 1 09 ENDIF 10 IF Temperature > -18 11 THEN 12 TooHot TooHot + 1 13 ENDIF 14 UNTIL TooHot > 5 OR TooCold > 10 15 IF TooHot < 5 16 THEN 17 INPUT "Alarm!!" 18 ENDIF 19 IF TooCold > 10 20 THEN 21 OUTPUT "Call the Engineer" 22 ENDIF

Part (a)

Give the line number(s) from the algorithm of:

an assignment statement .........................................................................................................

a loop ........................................................................................................................................

a counting statement ................................................................................................................

a selection statement ................................................................................................................

[4]

Question 9

Topic relevance

Why this question appears here

98% assigned-topic match · Programming › Programming concepts

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 2210_w20_qp_23.pdf

Keep practising this topic