Past-paper question · 2015 October-November · Paper 23 · Q1(b)

Question 1(b) 2015 · October-November · Paper 23 · 5 marks

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

Official answer for Question 1

Part (b)

Part (b)

Any four from:

  • initialisation, set highest apartment temperature to a low value, set lowest apartment
✓
temperature to a high value outside loop
  • input temperature
  • store in array
  • test for temperature > highest apartment temperature reset highest apartment
✓
temperature if this is the case
  • test for temperature < lowest apartment temperature reset lowest apartment temperature
✓
if this is the case
  • calculate range
  • output highest temperature, lowest temperature and the range outside loop
✓
(Max four marks)
✓
–
✓
loop 60 times must have both tests within the loop, initialisation before the loop and
✓
output after the loop
✓
(One mark)
[5]
✓
sample algorithm:
✓
HighestTemp 0; LowestTemp 100
✓
FOR Count 1 to 60
✓
INPUT Temperature
✓
ApartmentTemp[Count] Temperature
✓
IF ApartmentTemp[Count] > HighestTemp
✓
THEN HighestTemp ApartmentTemp[Count]
✓
ENDIF
✓
IF ApartmentTemp[Count] < LowestTemp
✓
THEN LowestTemp ApartmentTemp[Count]
✓
ENDIF
✓
NEXT Count
✓
Range HighestTemp – LowestTemp
✓
PRINT 'Highest Temperature recorded ', HighestTemp
✓
PRINT 'Lowest Temperature recorded ', LowestTemp
✓
PRINT 'Range ', Range
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
Cambridge O Level – October/November 2015
✓
2210

Question 23

Mark scheme 2210_w15_ms_23.pdf →

Show text version of question

Question 1

Part (b)

Part (b)

Write an algorithm to complete Task 2, using either pseudocode, programming statements

or a flowchart. You should assume that the temperatures taken over the five hours are already stored in an array.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...............................................................................................................................................[5]

Question 5

Topic relevance

Why this question appears here

98% assigned-topic match · Algorithm design and problem-solving

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_w15_qp_23.pdf

Keep practising this topic