Past-paper question · 2019 May-June · Paper 22 · Q2(a)

Question 2(a) 2019 · May-June · Paper 22 · 4 marks

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

Official answer for Question 2

Part (a)

Question 1

mark for each error identified + suggested correction

Question 4

  • Low ← Count should be Low ← Number
  • Number > Low should be Number < Low
  • UNTIL Count = 99 should be UNTIL Count > 99 or UNTIL
✓
Count = 100 or UNTIL Count >= 100 // Count ← 1
✓
should be Count ← 0
  • PRINT "Largest Number is ", Number should be PRINT
✓
"Largest Number is ", High

Mark scheme 2210_s19_ms_22.pdf →

Show text version of question

Question 2

Part (a)

An algorithm has been written in pseudocode to input 100 numbers, select and print the largest number and smallest number.

Count 1 INPUT Number High Number Low Count REPEAT INPUT Number IF Number > High THEN High Number ENDIF IF Number > Low THEN Low Number ENDIF Count Count + 1 UNTIL Count = 99 PRINT "Largest Number is ", Number PRINT "Smallest Number is ", Low

Find the four errors in the pseudocode and suggest a correction for each error.

Error 1 ........................................................................................................................................

Correction .................................................................................................................................

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

Error 2 ........................................................................................................................................

Correction .................................................................................................................................

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

Error 3 ........................................................................................................................................

Correction .................................................................................................................................

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

Error 4 ........................................................................................................................................

Correction .................................................................................................................................

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

[4]

Question 9

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 2210_s19_qp_22.pdf

Keep practising this topic