Past-paper question · 2017 October-November · Paper 23 · Q11(c)

Question 11(c) 2017 · October-November · Paper 23 · 46 marks

Original past-paper question for 11(C)
Original past-paper question for 11(C)
Original past-paper question for 11(C)
Reveal official mark-scheme answer

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

Mark scheme 2210_w17_ms_23.pdf →

Show text version of question

Question 11

Part (c)

Question 11

PRINT ' numbers were larger than 500'

There are four lines of code that contain errors.

State the line number for each error and write the correct code for that line.

Error 1 Line Number .............................

Correct Code ....................................................................................................................................

Error 2 Line Number .............................

Correct Code ....................................................................................................................................

Error 3 Line Number .............................

Correct Code ....................................................................................................................................

Error 4 Line Number .............................

Correct Code ....................................................................................................................................

[4]

Question 8

Part (c)

Explain what is meant by the term library routine.

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

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

...............................................................................................................................................[2]

Question 4

Part (a)

Four pseudocode descriptions and five pseudocode statements are shown. Draw one line to

link each pseudocode description to the correct pseudocode statement. Not all pseudocode statements will be used.

Pseudocode description Pseudocode statement

A
loop that will iterate at least

once. FOR…TO…NEXT

A
conditional statement to deal IF…THEN…ELSE…ENDIF

with many possible outcomes.

WHILE…DO…ENDWHILE

A
loop that will iterate a set

number of times. CASE…OF…OTHERWISE…ENDCASE

A
conditional statement with REPEAT…UNTIL

different outcomes for true and false.

[4]

Question 9

Part (b)

Write an algorithm in pseudocode, using a single loop, to print 50 names that have been

stored in an array.

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

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

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

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

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

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

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

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

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

...............................................................................................................................................[3]

Question 10

5 The flowchart below represents a program routine.

START

Flag 0 Count 1

Is Name[Count] Yes > Name[Count + 1]? Temp Name[Count]

No Name[Count] Name[Count + 1]

Name[Count + 1] Temp

Flag 1

Count Count + 1

No Is Count = 4?

Yes

No Is Flag = 0?

Yes

END

Question 11

Part (a)

The array used in the flowchart contains the following data:

Name[1] Name[2] Name[3] Name[4] Jamal Amir Eve Tara

Complete the trace table using the data given in the array.

Flag Count Name[1] Name[2] Name[3] Name[4] Temp Jamal Amir Eve Tara

[5]

Part (b)

Describe what the algorithm represented by the flowchart is doing.

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

...............................................................................................................................................[2]

Question 6 begins on Page 12.

reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after the live examination series.

Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.

Question 12

6 A wildlife park has a database table, called LIVESTOCK, to classify and record its animal species. Part of the database table is shown.

Species Classification Diet Legs Giraffe Mammal Herbivore 4 Elephant Mammal Herbivore 4 Crocodile Reptile Carnivore 4 Ostrich Bird Omnivore 2 Gorilla Mammal Herbivore 2 Bear Mammal Omnivore 4 Rhinoceros Mammal Herbivore 4 Hippopotamus Mammal Herbivore 4 Flamingo Bird Omnivore 2 Lion Mammal Carnivore 4 Turtle Reptile Omnivore 4 Penguin Bird Carnivore 2

Part (a)

Suggest another appropriate field that could be added to this database by stating its name

and data type. State its purpose and give an example of the data it could contain.

Field name ................................................................................................................................

Data Type .................................................................................................................................

Purpose ....................................................................................................................................

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

Example of data ........................................................................................................................

[2]

Part (b)

Use the query-by-example grid below to provide a list of all four legged mammals that are

herbivores, sorted alphabetically by species, with only the species displayed.

Field: Table: Sort: Show: Criteria: or:

[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_w17_qp_23.pdf

Keep practising this topic