Past-paper question · 2016 October-November · Paper 23 · Q19(e)(ii)

Question 19(e)(ii) 2016 · October-November · Paper 23 · 7 marks

Original past-paper question for 19(E)(II)
Original past-paper question for 19(E)(II)
Original past-paper question for 19(E)(II)
Original past-paper question for 19(E)(II)
Original past-paper question for 19(E)(II)
Original past-paper question for 19(E)(II)
Reveal official mark-scheme answer

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

Mark scheme 9608_w16_ms_23.pdf →

Show text version of question

Question 19

Part (e)

(ii)

Question 19

ENDWHILE

Question 7

A
first attempt was made at writing the ‘Search for product code’ module.

Ahmed designs this as a function ProductCodeSearch.

The function returns an integer value as follows:

  • if the product code is found, it returns the index position of the 1D array PCode being
  • searched

  • if the product code is not found, the function returns -1

Write program code for function ProductCodeSearch.

Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment statement for each variable used with its data type.

Programming language ...................................................................................................

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

...............................................................................................................................................[6]

Question 18

5 Study the following pseudocode statements.

CONST Pi = 3.1 : REAL

DECLARE Triangle, Base, Height, Radius, Cone : REAL

DECLARE a, b, c, Answer2 : INTEGER

DECLARE Answer1 : BOOLEAN

Base 2.6

Height 10

Triangle (Base * Height) / 2

Radius 1

Height 2

Cone 2 * Pi * Radius * (Radius + Height)

a 13

b 7

c 3

Answer1 NOT((a + b + c) > 28)

Total 34

Total Total - 2

Answer2 a + c * c

Give the final value assigned to each variable.

(ii)

Cone ...................................

[1]
Topic relevance

Why this question appears here

82% assigned-topic match · Data types and structures › Data types and records

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 9608_w16_qp_23.pdf

Keep practising this topic