Past-paper question · 2022 February-March · Paper 22 · Q2(b)

Question 2(b) 2022 · February-March · Paper 22 · 4 marks

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

Official answer for Question 2

Part (b)

✓
One mark suitable IF construct, one mark correct assignment statement, for example

Question 4

✓
IF Age < 7
✓
THEN
✓
CountUnder7 ← CountUnder7 + 1
✓
ENDIF
✓
One mark suitable message, one mark correct use of countUnder7 variable, for example
✓
OUTPUT "There are ", CountUnder7, " students aged under 7."
✓
0478/22
✓
Cambridge IGCSE – Mark Scheme
✓
February/March 2022
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_m22_ms_22.pdf →

Show text version of question

Question 2

Part (b)

Question 2

An algorithm has been written to:

  • input the ages of 100 students
  • count and output the number of students aged 7 and under 12
  • count and output the number of students aged 12 and under 18
  • count and output the number of students aged 18 and over.

Part (b)

Write the extra pseudocode statements that are needed to count and output the number of

students under the age of 7. Use the variable CountUnder7; assume CountUnder7 has already been set to zero.

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

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

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

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

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

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

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

[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 0478_m22_qp_22.pdf

Keep practising this topic