Past-paper question · 2017 May-June · Paper 32 · Q6(b)(i)

Question 6(b)(i) 2017 · May-June · Paper 32 · 3 marks

Original past-paper question for 6(B)(I)
Original past-paper question for 6(B)(I)
Reveal official mark-scheme answer Official mark-scheme answer for 6(B)(I)

Official answer for Question 6

Part (b)

(i)

✓
01 ForEver ← FALSE //TRUE

Question 1

Question 3

✓
02 REPEAT
✓
FOR FloorCounter ← 1 TO NoOfFloors
✓
03
✓
FOR SensorCounter ← 1 TO NumberOfSensors
✓
04

Question 1

✓
05
✓
READ Sensor(SensorCounter)on Floor(FloorCounter)
✓
06
✓
IF Sensor value outside range
✓
07
✓
THEN
✓
08
✓
OUTPUT “Problem on Floor ”, FloorCounter
✓
09
✓
ENDIF

Mark scheme 9608_s17_ms_32.pdf →

Show text version of question

Question 6

Part (b)

(i)

Question 6

A large office building has many floors. On each floor there are security sensors and security

cameras. There is the same number of sensors on each floor. The building has a single security room.

The images from the security cameras are output on monitors (one monitor for each floor) placed in the security room.

The data from the sensors are read and processed by a computer system. Sensor readings and warning messages can be displayed on the monitors.

A
software routine:
  • checks the readings from the sensors
  • outputs readings and warning messages to the monitors
  • loops continuously.

The routine uses the following pseudocode variables:

Identifier Data type Description FloorCounter INTEGER Loop counter for number of floors SensorCounter INTEGER Loop counter for number of sensors NumberOfFloors INTEGER Stores the number of floors NumberOfSensors INTEGER Stores the number of sensors ForEver BOOLEAN Stores value that ensures continuous loop

Question 13

(i)

Complete the following pseudocode algorithm for the routine.

01 ForEver ............................................................................................................... 02 REPEAT 03 FOR FloorCounter 1 TO NumberOfFloors 04 FOR SensorCounter 1 TO ...................................................................... 05 READ Sensor(SensorCounter)on Floor(FloorCounter) 06 IF Sensor value outside range 07 THEN 08 OUTPUT “Problem on Floor ”, FloorCounter 09 ENDIF 10 ENDFOR 11 ENDFOR 12 // 13 // Delay loop 14 // Delay loop 15 // 16 UNTIL .........................................................................................................................

[3]
Topic relevance

Why this question appears here

82% 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_s17_qp_32.pdf

Keep practising this topic