Past-paper question · 2015 May-June · Paper 21 · Q1(b)

Question 1(b) 2015 · May-June · Paper 21 · 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)

If loop used

  • initialisation before loop
  • loop
  • running total inside loop
  • calculation of average outside loop
  • output of average with message outside loop
✓
(Max 4 marks)
✓
–
✓
completion of at least 3 of initialisation, running total, calculation of average and
✓
output of average with message for both midday and midnight
✓
(1 mark)
[5]
✓
sample algorithm:
✓
MiddayTotal ← 0; MidnightTotal ← 0
✓
FOR Count ← 1 TO 7
✓
MiddayTotal ← MiddayTotal + MiddayTemperature[Count]
✓
MidnightTotal ← MidnightTotal + MidnightTemperature[Count]
✓
NEXT Count
✓
MiddayAverage ← MiddayTotal/7
✓
MidnightAverage ← MiddayTotal/7
✓
PRINT 'The average midday temperature is ', MiddayAverage
✓
PRINT 'The average midnight temperature is ', MidnightAverage
✓
If loop not used
  • total of 7 midday temperatures
  • calculation of midday average (Note could be combined as one calculation,
✓
see example below)
  • total of 7 midnight temperatures
  • calculation of midnight average (Note could be combined as one calculation,
✓
see example below)
  • output of both averages with suitable messages
[5]
✓
sample algorithm:
✓
MiddayAverage ← (MiddayTemperature[1]+ MiddayTemperature[2]+
✓
MiddayTemperature[3]+ MiddayTemperature[4]+
✓
MiddayTemperature[5]+ MiddayTemperature[6]+
✓
MiddayTemperature[7])/7
✓
MidnightAverage ← (MidnightTemperature[1]+
✓
MidnightTemperature[2]+ MidnightTemperature[3]+ Midnight[4]+
✓
Midnight[5]+ Midnight[6]+ MidnightTemperature[7])/7
✓
PRINT 'The average midday temperature is ', MiddayAverage
✓
PRINT 'The average midnight temperature is ', MidnightAverage
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
Cambridge O Level – May/June 2015
✓
2210

Question 21

Mark scheme 2210_s15_ms_21.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. Use temperatures for one week only. You should assume that Task 1 has already been completed.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

...............................................................................................................................................[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_s15_qp_21.pdf

Keep practising this topic