Cambridge IGCSE Computer Science (9-1) 0984 — 2019 Oct/Nov Paper 2 · Variant 2
0984/22/O/N/19 · 50 marks · ≈56 min
The question paper and its mark scheme, free to read here and free to download. This is Cambridge’s own paper, exactly as it was sat.
Question paper16 pages
















Mark scheme7 pages
Answers below. Sit the paper first if you are practising.







Paper as text
Question paper, page 1
This document consists of 13 printed pages and 3 blank pages. DC (NF/CT) 189394 © UCLES 2019 [Turn over Cambridge Assessment International Education Cambridge International General Certificate of Secondary Education (9–1) * 8 2 9 3 0 5 5 6 8 2 * COMPUTER SCIENCE 0984/22 Paper 2 Problem-solving and Programming October/November 2019 1 hour 45 minutes Candidates answer on the Question Paper. No Additional Materials are required. No calculators allowed. READ THESE INSTRUCTIONS FIRST Write your centre number, candidate number and name in the spaces at the top of this page. Write in dark blue or black pen. You may use an HB pencil for any diagrams, graphs or rough working. Do not use staples, paper clips, glue or correction fluid. DO NOT WRITE IN ANY BARCODES. Answer all questions. DO NOT ATTEMPT TASKS 1, 2 AND 3 in the pre-release material; these are for information only. You are advised to spend no more than 40 minutes on Section A (Question 1). No marks will be awarded for using brand names of software packages or hardware. Any businesses described in this paper are entirely fictitious. At the end of the examination, fasten all your work securely together. The number of marks is given in brackets [ ] at the end of each question or part question. The maximum number of marks is 50.
Question paper, page 2
2 0984/22/O/N/19 © UCLES 2019 Section A You are advised to spend no longer than 40 minutes answering this section. Here is a copy of the pre-release material. DO NOT attempt Tasks 1, 2 and 3 now. Use the pre-release material and your experience from attempting the tasks before the examination to answer Question 1. Pre-release material A company supplies concrete slabs for paving. The slabs are made to order in batches of 20; all slabs in a batch are identical. Customers can order from a small range of standard sizes and colours. All measurements are given in millimetres. The price is calculated at $0.05 for a volume of 100 000 mm3 of grey concrete; red and green concrete are charged at 10% more. Customers can choose their own colours; a custom colour has an initial set up cost of $5 then 15% more than the price for grey. Colour of slab Depth of slab Shapes Sizes for each shape Grey 38 Square 600 × 600 or 450 × 450 Red 45 Rectangular 600 × 700 or 600 × 450 Green Round Diameter 300 or 450 Custom Write and test a program or programs for the concrete slab company. • Your program or programs must include appropriate prompts for the entry of data; data must be validated on entry. • Error messages and other output need to be set out clearly and understandably. • All variables, constants and other identifiers must have meaningful names. You will need to complete these three tasks. Each task must be fully tested. Task 1 – Price for a batch of 20 slabs Using the information above set up a routine that allows a customer to choose the concrete slab they require and calculate a price for a batch of 20 slabs. The details of the slab chosen and the price for a batch of 20 should be displayed on the screen. Task 2 – Customer places an order Using the information from TASK 1, the customer places an order for the number of slabs they require. Orders for fewer than 20 slabs or more than 100 slabs are not accepted; orders that are not a multiple of 20 are rounded up to the next multiple of 20 slabs. Display the order price and the number of slabs to be produced. Task 3 – Flexible pricing The cost of concrete is variable. The cost for 100 000 mm3 of grey concrete can be input and two grades are available; basic at the cost input and best at 7% more. Use a copy of your program for TASK 1 to develop TASK 3 to input the cost and grade of concrete before calculating the price for 20 slabs.
Question paper, page 3
3 0984/22/O/N/19 © UCLES 2019 [Turn over 1 (a) All variables, constants and other identifiers must have meaningful names. (i) Describe the data structures that you have used to store the data for the concrete slabs in Task 1, include the name, data type and use for each data structure. … … … … … … … … … … … [5] (ii) State one variable that you have used in Task 3. Give the data type for the variable. State what it is used for. Variable name … Data type … Use … … [3] (b) Explain how you calculated the volume of a concrete slab in Task 1. … … … … … … [3]
Question paper, page 4
4 0984/22/O/N/19 © UCLES 2019 (c) Write an algorithm for Task 2, using either pseudocode, programming statements or a flowchart. Assume that Task 1 has been completed. … … … … … … … … … … … … … … … … … … … … … … … … … … …
Question paper, page 5
5 0984/22/O/N/19 © UCLES 2019 [Turn over … … … … … … … … … … … … … … … … … … … … … … … … … … … … [5]
Question paper, page 6
6 0984/22/O/N/19 © UCLES 2019 (d) Explain how you changed your program for Task 1 to meet the requirements for Task 3. Include and fully explain any altered or additional programming statements. … … … … … … … … … … … … … … … … … … … … … … … … … … … [4]
Question paper, page 7
7 0984/22/O/N/19 © UCLES 2019 [Turn over Section B 2 An algorithm has been written in pseudocode to select a random number using the function RandInt(n), which returns a whole number between 1 and the argument n. The algorithm then allows the user to guess the number. Number RandInt(100) TotalTry 1 REPEAT PRINT "Enter your guess now, it must be a whole number" INPUT Guess IF TotalTry > Number THEN PRINT "Too large try again" ENDIF IF Guess > Number THEN PRINT "Too small try again" ENDIF TotalTry Guess + 1 UNTIL Guess <> Number TotalTry TotalTry - 1 PRINT "Number of guesses ", TotalTry Find the four errors in the pseudocode and suggest a correction to remove each error. Error 1 … Correction … … Error 2 … Correction … … Error 3 … Correction … … Error 4 … Correction … … [4]
Question paper, page 8
8 0984/22/O/N/19 © UCLES 2019 3 (a) The flowchart checks the lengths of a batch of 10 ropes. For the batch to be accepted 90% of the lengths need to be between 24.9 and 25.1 metres. START END Is Count = 10 ? Is Reject <= 1 ? Is Length < 25.1 AND Length > 24.9 ? INPUT Length Reject 0 Count 0 OUTPUT "Batch accepted" OUTPUT "Batch rejected" No No No Yes Yes Yes Count Count + 1 Reject Reject + 1
Question paper, page 9
9 0984/22/O/N/19 © UCLES 2019 [Turn over Complete the trace table for the input data: 24.88, 25.01, 24.98, 25.00, 25.05, 24.99, 24.97, 25.04, 25.19, 25.07 Reject Count Length OUTPUT [4] (b) (i) It has been decided to only reject batches of rope that contain ropes that are too short. State the change required to the algorithm. … … [1] (ii) Explain how the algorithm to reject batches could be improved to make it more effective. … … … … [2]
Question paper, page 10
10 0984/22/O/N/19 © UCLES 2019 4 Four validation checks and four descriptions are shown. Draw a line to connect each validation check to the correct description. Validation Check Description Range check Checks that some data is entered. Presence check Checks for a maximum number of characters in the data entered. Length check Checks that the characters entered are all numbers. Type check Checks that the value entered is between an upper value and a lower value. [3] 5 A programmer writes a program to weigh baskets of fruit in grams, keeping a total of the weight and counting the number of baskets. The total weight is stored in a variable Total and the number of baskets is stored in a variable BasketCount. Explain, including examples of programming statements, how totalling and counting could be used in this program. Totalling … … … … … … Counting … … … … … … [4]
Question paper, page 11
11 0984/22/O/N/19 © UCLES 2019 [Turn over 6 Explain why constants, variables and arrays are used in programming. Constants … … … … Variables … … … … Arrays … … … … [6]
Question paper, page 12
12 0984/22/O/N/19 © UCLES 2019 7 A database table, SALES, is used to keep a record of items made and sold by a furniture maker. Item number Order number Notes Amount Status CH001 1921 Smith – six dining chairs 6 Delivered TB003 1921 Smith – large table 1 In progress CH001 1924 Hue – extra chairs 4 In progress CH003 1925 For stock 2 Cancelled BN001 1927 Patel – replacement bench 1 Not started ST002 1931 Sola – small table 1 Delivered CH003 1927 Patel – eight dining chairs with arms 8 Not started TB003 1927 Patel – large table 1 Not started (a) Explain why the field Item number could not be used as a primary key. … … [1]
Question paper, page 13
13 0984/22/O/N/19 © UCLES 2019 (b) A query-by-example has been written to display only the order number and item numbers of any items in progress or not started. Field: Item number Order number Amount Status Table: SALES SALES SALES SALES Sort: Show: 3 3 Criteria: Not Like "Delivered" or: Explain why the query-by-example is incorrect, and write a correct query-by-example. Explanation … … … … … Field: Table: Sort: Show: Criteria: or: [5]
Question paper, page 14
14 0984/22/O/N/19 © UCLES 2019 BLANK PAGE
Question paper, page 15
15 0984/22/O/N/19 © UCLES 2019 BLANK PAGE
Question paper, page 16
16 0984/22/O/N/19 © UCLES 2019 Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every 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 Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cambridgeinternational.org after the live examination series. Cambridge Assessment International Education is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of the University of Cambridge Local Examinations Syndicate (UCLES), which itself is a department of the University of Cambridge. BLANK PAGE
Mark scheme, page 1
This document consists of 7 printed pages. © UCLES 2019 [Turn over Cambridge Assessment International Education Cambridge International General Certificate of Secondary Education (9–1) COMPUTER SCIENCE 0984/22 Paper 2 October/November 2019 MARK SCHEME Maximum Mark: 50 Published This mark scheme is published as an aid to teachers and candidates, to indicate the requirements of the examination. It shows the basis on which Examiners were instructed to award marks. It does not indicate the details of the discussions that took place at an Examiners’ meeting before marking began, which would have considered the acceptability of alternative answers. Mark schemes should be read in conjunction with the question paper and the Principal Examiner Report for Teachers. Cambridge International will not enter into discussions about these mark schemes. Cambridge International is publishing the mark schemes for the October/November 2019 series for most Cambridge IGCSE™, Cambridge International A and AS Level components and some Cambridge O Level components.
Mark scheme, page 2
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 2 of 7 Generic Marking Principles These general marking principles must be applied by all examiners when marking candidate answers. They should be applied alongside the specific content of the mark scheme or generic level descriptors for a question. Each question paper and mark scheme will also comply with these marking principles. GENERIC MARKING PRINCIPLE 1: Marks must be awarded in line with: • the specific content of the mark scheme or the generic level descriptors for the question • the specific skills defined in the mark scheme or in the generic level descriptors for the question • the standard of response required by a candidate as exemplified by the standardisation scripts. GENERIC MARKING PRINCIPLE 2: Marks awarded are always whole marks (not half marks, or other fractions). GENERIC MARKING PRINCIPLE 3: Marks must be awarded positively: • marks are awarded for correct/valid answers, as defined in the mark scheme. However, credit is given for valid answers which go beyond the scope of the syllabus and mark scheme, referring to your Team Leader as appropriate • marks are awarded when candidates clearly demonstrate what they know and can do • marks are not deducted for errors • marks are not deducted for omissions • answers should only be judged on the quality of spelling, punctuation and grammar when these features are specifically assessed by the question as indicated by the mark scheme. The meaning, however, should be unambiguous. GENERIC MARKING PRINCIPLE 4: Rules must be applied consistently e.g. in situations where candidates have not followed instructions or in the application of generic level descriptors. GENERIC MARKING PRINCIPLE 5: Marks should be awarded using the full range of marks defined in the mark scheme for the question (however; the use of the full mark range may be limited according to the quality of the candidate responses seen). GENERIC MARKING PRINCIPLE 6: Marks awarded are based solely on the requirements as defined in the mark scheme. Marks should not be awarded with grade thresholds or grade descriptors in mind.
Mark scheme, page 3
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 3 of 7 Section A Question Answer Marks 1(a)(i) Data Structure(s) maximum two marks • Array • Variable • Constant Description maximum three marks • Name(s) one or more e.g. Colour • Data type(s) one or more e.g. String • Use(s) one or more e.g. To store the colour of the slab Additional data structure description using the same data structure type maximum one mark • Two or more full descriptions of the data structure including name, data type and use 5 1(a)(ii) • Variable name e.g. ConcretePrice • Data type e.g. Real • Use e.g. To store the price of the grade of concrete 3 1(b) Three from: • Using the shape, size and depth « • « the area of the shape is found « • « for all except round multiply length by breadth/show example « • « for round multiply Pi by half the diameter/radius squared « • « multiply the area by the depth to give the volume 3
Mark scheme, page 4
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 4 of 7 Question Answer Marks 1(c) Five from: MP1 Enter number of slabs to purchase with prompt MP2 Check if less than 20 or greater than 100 « MP3 « if so, reject the number and re-enter a value MP4 Attempt to round the number of slabs to the next 20 « MP5 Accurate attempt to round up to the next 20 MP6 Calculate the number of batches MP7 Calculate price to pay (number of batches × price per batch from Task 1) MP8 Display price and number of slabs produced « MP9 « Suitable output message(s) Sample answer REPEAT PRINT "Enter Number of slabs to purchase" INPUT Number UNTIL Number >= 20 and Number <= 100 PurchaseNo Number IF Number > 20 AND Number <= 40 THEN PurchaseNo 40 ENDIF IF Number > 40 AND Number <= 60 THEN PurchaseNo 60 ENDIF IF Number > 60 AND Number <= 80 THEN PurchaseNo 80 ENDIF IF Number > 80 THEN PurchaseNo 100 ENDIF BatchNo PurchaseNo / 20 PriceToPay BatchNo * BatchPrice //BatchPrice calculated in Task 1 PRINT "Price for ", PurchaseNo, " Slabs is $", PriceToPay 5 1 (d) Four from explanations: • Enter the price of the concrete • Store the price of the concrete • Set up variable(s) for grades • Input the grade • The price that is input is used in the final price calculation instead of 0.05 • The price calculation depends on the grade input e.g. 1.07 × price or price + price × 0.07 for Best If no programming code seen to support at least one explanation maximum of three marks can be awarded. 4
Mark scheme, page 5
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 5 of 7 Section B Questio n Answer Mark s 2 One mark for each error identified and suggested correction: • IF TotalTry > Number should be IF Guess > Number • IF Guess > Number should be IF Guess < Number • TotalTry ← Guess + 1 should be TotalTry ← TotalTry + 1 • UNTIL Guess <> Number should be UNTIL Guess = Number 4 Questio n Answer Mark s 3(a) Reject Count Length OUTPUT 0 0 0 1 24.88 1 2 25.01 1 3 24.98 1 4 25.00 1 5 25.05 1 6 24.99 1 7 24.97 1 8 25.04 1 9 25.19 2 10 25.07 Batch rejected One mark for each correct column max. 4 4 3(b)(i) • Remove Length < 25.1 AND 1 3(b)(ii) Two from: • Check the reject counter after each incrementation/remove reject check after counter = 10 « • « as soon as Reject = 2 / >1 ... • « reject batch and end 2
Mark scheme, page 6
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 6 of 7 Questio n Answer Mark s 4 One mark for each correct line, up to maximum of three marks. 3 Questio n Answer Mark s 5 Totalling: • Adding the weight of each basket to the total weight as each weight is entered • Total = Total + Weight Counting: • Adding one to/incrementing the number of baskets as each weight is entered • BasketCount = BasketCount + 1 4
Mark scheme, page 7
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2019 © UCLES 2019 Page 7 of 7 Questio n Answer Mark s 6 Constants Two from: • The value cannot be changed accidentally « • « during the execution of the program • Value only needs to be changed once if circumstances change/during the initialisation process Variables Two from: • Stores a value that can change « • « during the execution of the program • Can use a variable without knowing its value Arrays Two from: • A list of items of the same data type « • « stored under a single name • To reduce the number of variables used • Any item can be found using an index number to show its place in the list 6 Questio n Answer Mark s 7(a) • Number is repeated/not unique 1 7(b) • Item number not displayed/Amount column not required • Not Like ‘Delivered’ will also show cancelled items Field: Item number Order number Status Table: SALES SALES SALES Sort: Show: ; ; Criteria: Like "Not started" or: Like "In progress" • Correct Item number column • Correct Order number column and any additional column not shown • Correct status column 5
What you needed in this session
Cambridge’s own grade thresholds for 2019 Oct/Nov, Paper 2 · Variant 2. A higher threshold means an easier paper — the bar moves with how the cohort did.