Question 11(c) 2017 · May-June · Paper 21 · 27 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 11
Part (c)
Question 11
PRINT ′The average of the numbers you entered is ′, Average
There are four errors in this code.
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 .....................................................................................................................................
Question 10
3 A satellite navigation system works using destination details entered by the user, either a new destination or chosen from previously saved destinations. The satellite navigation system will then output directions to the destination in the form of either a visual map or a list of directions.
This structure diagram shows some of its sub-systems.
Complete the diagram by filling in the empty boxes.
Satellite navigation system
Input destination
Map List
4 For each of the four statements in the table, place a tick in the correct column to show whether it is an example of validation or verification.
Statements Validation Verification To automatically check the accuracy of a bar code To check if the data input is sensible To check if the data input matches the data that has been supplied To automatically check that all required data fields have been completed
Question 11
Part (c)
Write an algorithm, using pseudocode, to input a number between 0 and 100 inclusive. The
algorithm should prompt for the input and output an error message if the number is outside this range.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
Question 12
6 This flowchart inputs a range of temperatures in degrees Fahrenheit.
As each temperature is input, it is compared with the previous highest temperature. If it is higher than the current highest, it replaces the previous highest temperature and then it is converted to degrees Celsius.
For ease of calculation, the final step of the Fahrenheit to Celsius conversion has been approximated as division by 2.
When –1 is entered, the input process stops and the highest temperature (in both Fahrenheit and Celsius) is output.
START
HighF -100 HighC -100
INPUT TempF
Is TempF No Is TempF No = -1? > HighF?
Yes Yes
HighF TempF
HighC (TempF-32)/2
OUTPUT 'The highest temperature is, ', HighF, ' Fahrenheit, ', HighC, ' Celsius.'
END
Question 13
Complete the trace table for the input data:
HighF HighC TempF OUTPUT
Question 14
7 A television (TV) store has a database table, TVSTOCK, for its new range of televisions. The table stores the screen size of each TV, whether it will show 3D, whether the screen is curved or flat, if the internet is available on the TV, if it has a built-in hard disk drive and the price. Part of the database table is shown below.
TVID ScreenSize 3D CurvedFlat Internet HDD Price TV80CVINT 80 YES CV YES YES $7,000.00 TV65CVINT 65 YES CV YES YES $5,000.00 TV60CVINT 60 YES CV YES YES $4,500.00 TV60FTINT 60 YES FT YES YES $4,000.00 TV55CVINT 55 YES CV YES NO $3,000.00 TV55FTINT 55 YES FT YES NO $3,500.00 TV55FTNIN 55 YES FT NO NO $3,000.00 TV50CVINT 50 YES CV YES NO $2,500.00 TV50FTINT 50 YES FT YES NO $2,000.00 TV50FTNIN 50 YES FT NO NO $1,750.00 TV42FTINT 42 YES FT YES NO $1,500.00 TV37FTINT 37 NO FT YES NO $1,200.00 TV20FTNIN 20 NO FT NO NO $800.00 TV15FTNIN 15 NO FT NO NO $400.00
Part (a)
State the type of the field TVID and give a reason for your choice.
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[1]
Part (b)
Complete the table with the most appropriate data type for each field.
Field name Data type ScreenSize 3D CurvedFlat Internet HDD Price
Question 15
Part (c)
Use the query-by-example grid below to provide a list of all of the curved screen TVs that
have a built-in hard disk drive. Make sure the list only displays the TVID, the price and the screen size in ascending order of price.
Field: Table: Sort: Show: Criteria: or:
Question 16
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.
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_s17_qp_21.pdf
