Past-paper question · 2023 May-June · Paper 23 · Q5(b)

Question 5(b) 2023 · May-June · Paper 23 · 3 marks

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

Official answer for Question 5

Part (b)

✓
One mark per mark point, max three

Question 3

✓
appropriate REPEAT / WHILE loop begin and end
✓
input of Length
✓
appropriate input prompt / error message
✓
correct loop exit/entry condition / selection
✓
Example answers:
✓
WHILE Loop
✓
OUTPUT "Enter a number between 15 and 35 inclusive"
✓
INPUT Length
✓
WHILE Length <15 OR Length > 35 (DO)
✓
OUTPUT "Your number must be between 15 and 35 inclusive
✓
INPUT Length
✓
ENDWHILE
✓
REPEAT Loop
✓
REPEAT
✓
OUTPUT "Enter a number between 15 and 35 inclusive"
✓
INPUT Length
✓
UNTIL Length >= 15 AND LENGTH <= 35
✓
0478/23
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2023
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_s23_ms_23.pdf →

Show text version of question

Question 5

Part (b)

Part (b)

Write an algorithm in pseudocode to make sure that an input for the variable Length is

between 15 and 35 inclusive. The code must iterate until a valid input has been made and the code must include appropriate messages.

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

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

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

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

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

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

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

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

[3]
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_s23_qp_23.pdf

Keep practising this topic