Past-paper question · 2015 October-November · Paper 23 · Q9(a)

Question 9(a) 2015 · October-November · Paper 23 · 8 marks

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

The answer for this question is in the official mark scheme: open the mark scheme.

Mark scheme 2210_w15_ms_23.pdf →

Show text version of question

Question 9

Part (a)

Question 9

PRINT Num

There are four errors in this code.

Locate these errors and suggest code corrections to remove each error.

1 .......................................................................................................................................................

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

2 .......................................................................................................................................................

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

3 .......................................................................................................................................................

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

4 .......................................................................................................................................................

......................................................................................................................................................[4]

Question 7

Question 3 begins on page 8.

Question 8

Question 3

Part (a)

This pseudocode inputs an integer. The predefined function DIV gives the value of the

division, e.g. Y 10 DIV 3 gives the value Y = 3. The predefined function MOD gives the value of the remainder, e.g. Y 10 MOD 3 gives the value Y = 1.

INPUT X WHILE X > 15 DO T1 X DIV 16 T2 X MOD 16 CASE T2 OF 10:OUTPUT A 11:OUTPUT B 12:OUTPUT C 13:OUTPUT D 14:OUTPUT E 15:OUTPUT F OTHERWISE OUTPUT T2 ENDCASE X T1 ENDWHILE CASE X OF 10:OUTPUT A 11:OUTPUT B 12:OUTPUT C 13:OUTPUT D 14:OUTPUT E 15:OUTPUT F OTHERWISE OUTPUT X ENDCASE

Question 9

Complete a trace table for each of the two input values 37 and 191.

Trace table for input value 37

X T1 T2 OUTPUT

Trace table for input value 191

X T1 T2 OUTPUT

[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 2210_w15_qp_23.pdf

Keep practising this topic