Question 8(e) 2015 · May-June · Paper 21 · 22 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 8
Part (e)
Question 8
UNTIL Counter < 10
There are four errors in this code.
Locate these errors and suggest a corrected piece of code for each error.
1 .......................................................................................................................................................
..........................................................................................................................................................
2 .......................................................................................................................................................
..........................................................................................................................................................
3 .......................................................................................................................................................
..........................................................................................................................................................
4 .......................................................................................................................................................
......................................................................................................................................................[4]
Question 7
Question 3 begins on page 8.
Question 8
3 The flowchart below inputs the weight of a number of parcels in kilograms. Parcels weighing more than 25 kilograms are rejected. A value of –1 stops the input.
The following information is output: the total weight of the parcels accepted and number of parcels rejected.
START
7RWDOĸ 5HMHFWĸ
INPUT Weight
Is Weight Yes OUTPUT Total, = –1? Reject
No END
Is Weight Yes 5HMHFWĸ5HMHFW > 25?
No
7RWDOĸ7RWDO:HLJKW
Question 9
Complete the trace table for the input data:
1.8, 26.0, 7.0, 11.3, 10.0, 2.5, 25.2, 5.0, 19.8, 29.3, –1
Total Reject Weight OUTPUT
4 Five data types and five data samples are shown below.
Draw a line to link each data type to the correct data sample.
Data type Data sample Integer 'a'
Real 2
Char 2.0
String True
Boolean "Twelve"
Question 10
5 Explain the difference between a variable and a constant in a program.
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
......................................................................................................................................................[2]
6 Identify three different loop structures that you can use when writing pseudocode.
1 .......................................................................................................................................................
..........................................................................................................................................................
2 .......................................................................................................................................................
..........................................................................................................................................................
3 .......................................................................................................................................................
......................................................................................................................................................[3]
7 A database, PROPERTY, was set up to show the prices of properties for sale and the features of each property. Part of the database is shown below.
Brochure Number of Number of Price Property Type Garden Garage No Bedrooms Bathrooms in $ Bungalow B17 7 4 Yes Yes 750,000 Apartment A09 2 1 No No 100,000 House H10 4 2 Yes No 450,000 House H13 3 2 Yes No 399,000 Apartment A01 2 2 No Yes 95,000 Apartment A16 1 1 No No 150,000 House H23 3 1 No Yes 250,000 House H46 2 1 Yes Yes 175,000
Part (e)
Complete the query-by-example grid below to select and show the brochure number, property
type and price of all properties with a garage below $200,000.
Field: Table: Sort: Show: Criteria: or:
Question 12
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.
Why this question appears here
98% assigned-topic match · Databases
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_s15_qp_21.pdf
