Past-paper question · 2024 February-March · Paper 22 · Q3(a)

Question 3(a) 2024 · February-March · Paper 22 · 4 marks

Original past-paper question for 3(A)
Original past-paper question for 3(A)
Reveal official mark-scheme answer Official mark-scheme answer for 3(A)

Official answer for Question 3

Part (a)

✓
One mark for each point max four.

Question 4

  • input value, outside loop
  • correct use of loop
  • checking value input against contents of array …
  • ... appropriate action
  • correct outputs
✓
Example:
✓
INPUT MyNumber
✓
Location 0
✓
FOR Index 1 TO 50
✓
IF Values[Index] = MyNumber
✓
THEN
✓
Location Index
✓
ENDIF
✓
NEXT Index
✓
IF Location = 0
✓
THEN
✓
OUTPUT "Not found"
✓
ELSE
✓
OUTPUT Location
✓
ENDIF
✓
Cambridge IGCSE – Mark Scheme
✓
0478/22
✓
February/March 2024
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_m24_ms_22.pdf →

Show text version of question

Question 3

Part (a)

Question 3

A linear search and a bubble sort are standard methods of solution.

Fifty numbers are already stored in the array Values[1:50]

Part (a)

Write an algorithm in pseudocode to input a number, MyNumber, and use a linear search to

test if that number is stored in the array. If the number is found in the array, the position in the array is output. If the number is not found in the array, “Not found” is output.

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

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

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

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

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

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

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

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

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

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

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

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

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

[4]

Question 4

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_m24_qp_22.pdf

Keep practising this topic