Past-paper question · 2008 October-November · Paper 3 · Q9(a)
Question 9(a) 2008 · October-November · Paper 3 · 5 marks
Reveal official mark-scheme answer
Official answer for Question 9
Part (a)
Part (a)
INPUT STUDENT
✓
FOR COUNT = 0 TO 19
✓
IF ARRAY (COUNT) = STUDENT THEN REPORT ‘FOUND’, COUNT
✓
END
✓
END IF
✓
NEXT
✓
REPORT ‘ERROR,NOT IN SET’
✓
END
✓
Mark Points:
✓
Alternative response:
- Input of student name
- Identify student
- Loop around selection…
- Compare required student with…
- with correct count/condition
- each name in turn
- correct IF…THEN…
- Keep count of number of names looked at
- with correct condition and…
- If name matches, then report…
- correct output, including COUNT
- Count minus one
- Error report
- If end of array reached then report error
✓
(1 per –, max 5)
[5]
Show text version of question
Question 9
Part (a)
Question 9
The names of 20 students in a computing class are stored in an array called
NAME(X) where X stands for a number between 0 and 19.
Part (a)
Describe an algorithm to find the position of a particular student in the array, using a serial
search.
[5]
Topic relevance
Why this question appears here
82% assigned-topic match · Programming › Constructs
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 9691_w08_qp_3.pdf
