Past-paper question · 2024 October-November · Paper 22 · Q7(c)

Question 7(c) 2024 · October-November · Paper 22 · 2 marks

Original past-paper question for 7(C)
Original past-paper question for 7(C)
Original past-paper question for 7(C)
Reveal official mark-scheme answer Official mark-scheme answer for 7(C)

Official answer for Question 7

Part (c)

✓
One mark per mark point (max two)

Question 2

✓
•
✓
The program would accept the value and enter the FOR loop
✓
•
✓
Count would keep reducing by 1 and would never reach 1, as it would
✓
already be less than 1
✓
•
✓
There would be an endless loop
✓
Cambridge IGCSE – Mark Scheme
✓
0478/22
✓
October/November
✓
PUBLISHED
✓
2024
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_w24_ms_22.pdf →

Show text version of question

Question 7

Part (c)

Question 7

This pseudocode represents an algorithm.

An input of –1 will terminate the algorithm.

DECLARE Count : INTEGER DECLARE Answer : INTEGER DECLARE Value : INTEGER REPEAT INPUT Value IF Value <> -1 THEN

Answer Value FOR Count Value - 1 TO 1 STEP -1 Answer Answer * Count NEXT Count OUTPUT Answer ENDIF UNTIL Value = -1

Part (c)

Describe the problem that would be caused in this algorithm if a Value of 1, 0 or less than –1

was input.

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

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

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

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

[2]
Topic relevance

Why this question appears here

80% 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_w24_qp_22.pdf

Keep practising this topic