Question 9(b) 2018 · October-November · Paper 23 · 12 marks
Reveal official mark-scheme answer
The answer for this question is in the official mark scheme: open the mark scheme.
Show text version of question
Question 9
Part (b)
Question 9
NEXT Count
Part (b)
State the purpose of this program.
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[1]
Question 9
5 The algorithm allows a number to be entered. It then calculates and outputs the next number in the mathematical series.
Fib 1 Prev2 0 Prev1 1 INPUT Number IF Number = 0 THEN Fib 0 ENDIF WHILE Number > 2 Fib Prev2 + Prev1 Prev2 Prev1 Prev1 Fib Number Number - 1 ENDWHILE OUTPUT Fib
Part (a)
Complete the trace table for the input data: 7
Fib Prev2 Prev1 Number OUTPUT
Part (b)
Complete the trace table for the input data: 2
Fib Prev2 Prev1 Number OUTPUT
Question 10
6 An online fruit tree specialist sells fruit trees in various sizes. A database table, TREETAB, shows the tree type and, for each size, the price and whether they are in stock.
Tree Type Size1 Size1 In Size2 Size2 In Size3 Size3 In Apple 10.95 Yes 14.95 Yes 29.95 Yes Apple 12.95 Yes 14.95 Yes 29.95 Yes Cherry 24.95 No 34.95 No 59.95 Yes Fig 19.95 Yes 29.95 No 49.95 Yes Guava 19.95 No 29.95 No 59.95 No Nectarine 8.50 Yes 11.95 Yes 19.95 Yes Olive 19.95 No 39.95 Yes 59.95 Yes Peach 9.25 No 11.95 Yes 19.95 Yes Pear 10.95 Yes 14.95 Yes 29.95 Yes Plum 8.95 Yes 11.95 Yes 19.95 Yes Pomegranate 12.95 No 18.95 Yes 34.95 No Quince 34.95 Yes 44.95 Yes 84.95 No
Part (a)
State whether any of the fields shown would be suitable as a primary key.
...................................................................................................................................................
Explain your answer .................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
Part (b)
Complete the table to show the most appropriate data type for each of the fields based on the
data shown in the table at the start of question 6.
Field Data type Tree Type Size3 Size2 In
Question 11
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_w18_qp_23.pdf
