Past-paper question · 2022 February-March · Paper 22 · Q4(a)
Question 4(a) 2022 · February-March · Paper 22 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 4
Part (a)
✓
One mark each for columns Number and OUTPUT
Question 6
✓
Two marks for column C first four values (1) last three values (1)
✓
Two marks for column D first six values (1) last four values (1)
✓
OUTPUT
✓
Number
✓
C
✓
D
Question 7
✓
0
Question 3
Question 2
Question 1
Question 6
✓
0
Question 3
Question 1
Question 2
Question 2
Question 1
Question 2
Question 5
✓
0
Question 2
Question 1
Question 4
✓
0
Question 2
Question 1
Question 1
Question 1
- 1
Show text version of question
Question 4
Part (a)
Question 4
This flowchart inputs a whole number. The function INT returns the integer value of a number. For
example, INT (7.5) is 7
An input of -1 ends the routine.
START
INPUT Number
IS Number Yes END = –1? No
C
0
D
INT(Number/2)
IS INT(Number/D) Yes = Number/D?
No
C
C + 1
D
D – 1
No IS D = 1?
Yes
Yes IS C = 0? No
OUTPUT C
Question 11
Part (a)
Complete the trace table for the given algorithm using this input data:
7, 6, 5, 4, –1, 12, 34
Number C D OUTPUT
[6]
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 0478_m22_qp_22.pdf
