Cambridge IGCSE Computer Science (9-1) 0984 — 2024 Oct/Nov Paper 2 · Variant 2
0984/22/O/N/24 · 75 marks · ≈84 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 scheme14 pages
Answers below. Sit the paper first if you are practising.














Paper as text
Question paper, page 1
This document has 16 pages. Any blank pages are indicated. [Turn over Cambridge IGCSE™(9–1) * 0 3 4 7 1 5 0 3 4 0 * COMPUTER SCIENCE 0984/22 Paper 2 Algorithms, Programming and Logic October/November 2024 1 hour 45 minutes You must answer on the question paper. No additional materials are needed. INSTRUCTIONS ● Answer all questions. ● Use a black or dark blue pen. You may use an HB pencil for any diagrams or graphs. ● Write your name, centre number and candidate number in the boxes at the top of the page. ● Write your answer to each question in the space provided. ● Do not use an erasable pen or correction fluid. ● Do not write on any bar codes. ● Calculators must not be used in this paper. INFORMATION ● The total mark for this paper is 75. ● The number of marks for each question or part question is shown in brackets [ ]. ● No marks will be awarded for using brand names of software packages or hardware. DC (KAS) 347702 © UCLES 2024 , , * 0000800000001 * ¬O. 4mHuOªE`{6W ¬[rQ¦u\{~§lvr9 ¥EuUuEU UU EUeUU
Question paper, page 2
2 0984/22/O/N/24 © UCLES 2024 1 Tick (✓) one box to complete this sentence. A solution to a problem may be represented using pseudocode, flowcharts or A procedures. B processes. C structure diagrams. D sub-systems. [1] 2 Tick (✓) one box to complete this sentence. A pseudocode example of a selection statement is A CALL Sorting(Value1, Value2) B DECLARE Count : INTEGER C IF X = 7 THEN Y 21 ENDIF D WHILE X <> -1 DO [1] 3 Four flowchart symbols and five purposes are shown. (a) Draw one line to link each flowchart symbol to its correct purpose. Not all purposes will be used. Flowchart symbol Purpose subroutine process flow decision terminator [4] * 0000800000002 * , , ĬÍĊ®Ġ´íÈõÏĪÅĊÝù¸þ× ĬăÙñÔĢĆēãĆüČĔĀÂāāĂ ĥĕĥÕµõąµµĕąÅÅĕÅÕõÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 3
3 0984/22/O/N/24 © UCLES 2024 [Turn over (b) An algorithm needs to total 50 numbers between 1 and 100 inclusive. Draw a flowchart that: • uses a count-controlled loop from 1 to 50 • uses an appropriate prompt to ask for a number between 1 and 100 • totals the numbers as they are entered • outputs the total after the loop has completed with an appropriate message. [6] * 0000800000003 * , , ĬÏĊ®Ġ´íÈõÏĪÅĊÝû¸þ× ĬăÚòÜĨĊģÖôą½ÈøĖāñĂ ĥĕĕĕõĕĥÕåĥÕÅÅõåĕĥÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 4
4 0984/22/O/N/24 © UCLES 2024 4 This pseudocode algorithm is intended to sort a pre-populated one-dimensional (1D) array named ItemList into alphabetical order using a bubble sort. 01 DECLARE ItemList : ARRAY[1:100] OF STRING 02 DECLARE Counter : STRING 03 DECLARE Limit : INTEGER 04 DECLARE Pass : INTEGER 05 DECLARE Swapped : BOOLEAN 06 DECLARE Temp : STRING 07 Limit 100 08 Pass 1 09 Temp TRUE 10 WHILE Swapped = TRUE OR Pass <= Limit - 1 DO 11 Swapped FALSE 12 FOR Counter 1 TO Limit – Pass 13 IF ItemList[Counter] > ItemList[Counter + 1] 14 THEN 15 Temp ItemList[Counter] 16 ItemList[Counter] ItemList[Counter + 1] 17 ItemList[Counter] Temp 18 Swapped TRUE 19 ENDCASE 20 Pass Pass + 1 21 NEXT Counter 22 ENDWHILE (a) Identify the line numbers of five errors in the pseudocode and suggest a correction for each error. Error 1 line number … Correction … … Error 2 line number … Correction … … Error 3 line number … Correction … … Error 4 line number … Correction … … * 0000800000004 * , , ĬÍĊ®Ġ´íÈõÏĪÅĊßù¸Ā× ĬăÚóÜĞüĦáîþÆĦܸđĉĂ ĥåÅĕµĕĥõÅÅåÅąõąĕõÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 5
5 0984/22/O/N/24 © UCLES 2024 [Turn over Error 5 line number … Correction … … [5] (b) A bubble sort algorithm can be written to include features that make it more efficient. Explain why the corrected bubble sort algorithm is efficient. … … … … … … [3] 5 Analysis is one stage in the program development life cycle. (a) State one other stage in the program development life cycle. … [1] (b) Describe the analysis stage of the program development life cycle. … … … … … … [3] 6 Outline one type of verification check that could be used when inputting data. … … … … [2] * 0000800000005 * , , ĬÏĊ®Ġ´íÈõÏĪÅĊßû¸Ā× ĬăÙôÔĬøĖØČóă²äĤđùĂ ĥåµÕõõąĕÕµõÅąĕĥÕĥÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 6
6 0984/22/O/N/24 © UCLES 2024 7 This pseudocode represents an algorithm. An input of –1 will terminate the algorithm. DECLARE Count : INTEGER DECLARE Answer : INTEGER DECLARE Value : INTEGER REPEAT INPUT Value IF Value <> -1 THEN Answer Value FOR Count Value - 1 TO 1 STEP -1 Answer Answer * Count NEXT Count OUTPUT Answer ENDIF UNTIL Value = -1 (a) Complete the trace table for the input data: 5, 6, –1, 20, 9, 4 Value Count Answer OUTPUT [5] * 0000800000006 * , , ĬÑĊ®Ġ´íÈõÏĪÅĊÞûµþ× ĬăÚôÏĢĐĐÐÿĂúÒÜā¹ĉĂ ĥõĕÕõÕąµĕÕÕÅÅĕÅĕµÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 7
7 0984/22/O/N/24 © UCLES 2024 [Turn over (b) State the purpose of this algorithm. … … [1] (c) Describe the problem that would be caused in this algorithm if a Value of 1, 0 or less than –1 was input. … … … … [2] 8 Different types of test data are used during program development to make sure a program works as intended. A program being developed takes as input whole numbers that are not greater than 80. Identify two items of test data to test the whole number limit of 80. Explain the reason for your choice of the data in each case. Test data 1 … Reason for choice … … Test data 2 … Reason for choice … … [4] * 0000800000007 * , , ĬÓĊ®Ġ´íÈõÏĪÅĊÞùµþ× ĬăÙó×ĨĔĠéùï¯ĆäÕ¹ùĂ ĥõĥĕµµĥÕąåąÅÅõåÕåÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 8
8 0984/22/O/N/24 © UCLES 2024 9 Consider the logic expression: X = (NOT P OR Q) NAND (Q XOR R) (a) Draw a logic circuit for this logic expression. Each logic gate must have a maximum of two inputs. Do not simplify the logic expression. P Q X R [4] (b) Complete the truth table for the given logic expression. P Q R Working space X 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 [4] * 0000800000008 * , , ĬÑĊ®Ġ´íÈõÏĪÅĊàûµĀ× ĬăÙò×ĞĢĩÎ÷ø¸èĀ÷éāĂ ĥŵĕõµĥõĥąõÅąõąÕµÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 9
9 0984/22/O/N/24 © UCLES 2024 [Turn over 10 The function LENGTH(X) calculates the length of a string X Write the pseudocode statements to: • allow a line of text to be input to an appropriate variable • store this line of text in a text file called Main.txt • calculate the length of the line of text and output the text in lower case along with its length • store the lower-case line of text in a text file called Lowercase.txt Make sure that any variables used are declared and that both text files are closed after they have been used. … … … … … … … … … … … … … … [6] * 0000800000009 * , , ĬÓĊ®Ġ´íÈõÏĪÅĊàùµĀ× ĬăÚñÏĬĞęëāĉñôøãéñĂ ĥÅÅÕµÕąĕõõåÅąĕĥĕåÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 10
10 0984/22/O/N/24 © UCLES 2024 11 A database table called Booking28 stores details of hotel rooms and bookings for the week beginning Monday 7 July 2025. RoomNo Type Guests Rate$ Mon Tue Wed Thu Fri Sat Sun 101D Double 2 99.99 T T T T F T T 102D Double 2 99.99 T T T F T T T 103F Family 4 150.00 T T T T T T T 104S Single 1 72.50 F T T F T T T 105S Single 1 72.50 F T T F T T T 106T Twin 2 120.00 T T T T F T T 201F Family 4 160.00 F F T T T T T 202D Double 2 120.00 T F T T T T T 203T Twin 2 120.00 T F T T T T T 204T Twin 2 125.00 T F T F T T T 205S Single 1 79.99 T F T T F T T 301D Double 2 200.00 F T T F F T T 302T Twin 2 200.00 T T T T F T T 303P Suite 4 500.00 T T T T F T T 304P Suite 6 700.00 F F F F T T T (a) State the number of fields and records in this database table. Fields … Records … [2] (b) State the reason why the Type field would not be suitable as a primary key. … … [1] * 0000800000010 * , , ĬÑĊ®Ġ´íÈõÏĪÅĊÝû·þ× ĬăÜòÎĠĪïÔðïĎÌþēđùĂ ĥĕÕÕõµÅõŵõąąÕąÕąÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 11
11 0984/22/O/N/24 © UCLES 2024 [Turn over (c) The database uses only the data types: • alphanumeric • character • Boolean • integer • real • date/time. Complete the table to show the fields that could have the given data types. Only one field name is required in each box and each field name must be different. Field Data type alphanumeric Boolean real integer [2] (d) Give the output that would be produced by the structured query language (SQL) statement: SELECT RoomNo, Type, Guests, Rate$ FROM Booking28 WHERE Mon <> T; … … … … … … [3] * 0000800000011 * , , ĬÓĊ®Ġ´íÈõÏĪÅĊÝù·þ× ĬăÛñÖĪĦÿåĊĂÛĐöÇđĉĂ ĥĕåĕµÕåĕÕÅåąąµĥĕĕÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 12
12 0984/22/O/N/24 © UCLES 2024 12 A one-dimensional (1D) array Rooms[] contains the names of up to 20 rooms in a house. A two-dimensional (2D) array Dimensions[] is used to store the length, width and area of each room. The position of any room’s data is the same in both arrays. For example, the data in index 5 of Dimensions[] belongs to the room in index 5 of Rooms[] The variable Number stores the number of rooms for which data is to be input. There must be at least 3 rooms but no more than 20. Write a program that meets the following requirements: • allows the number of rooms for which data is required to be input, stored and validated • allows the name of the room and the length and width of the room, in metres, to be entered and stored • allows the area of each room to be calculated as length multiplied by width and stored as square metres rounded to two decimal places • calculates the average size of all the rooms by area, in square metres, rounded to two decimal places • finds the largest room and smallest room by area • outputs the names of all rooms with their dimensions and area • outputs the names of the largest room and smallest room by area • outputs the total area of the house and the average size of all the rooms by area. You must use pseudocode or program code and add comments to explain how your code works. You do not need to declare any arrays or variables; you may assume that this has already been done. All inputs and outputs must contain suitable messages. … … … … … … … … … … … … … * 0000800000012 * , , ĬÑĊ®Ġ´íÈõÏĪÅĊßû·Ā× ĬăÛôÖĤĘĊÒĈĉÔ®ÚĥāñĂ ĥåõĕõÕåµµĥÕąÅµÅĕąÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 13
13 0984/22/O/N/24 © UCLES 2024 [Turn over … … … … … … … … … … … … … … … … … … … … … … … … … … … … * 0000800000013 * , , ĬÓĊ®Ġ´íÈõÏĪÅĊßù·Ā× ĬăÜóÎĦĜúçòøĕĪâ±āāĂ ĥåąÕµµÅÕåĕąąÅÕåÕĕÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 14
14 0984/22/O/N/24 © UCLES 2024 … … … … … … … … … … … … … … … … … … … … … … … … [15] * 0000800000014 * , , ĬÍĊ®Ġ´íÈõÏĪÅĊàú¶Ă× ĬăÛñÏĬħĂÕøóºÆûµ±ĉĂ ĥąąĕõÕąõÅąąÅąĕąĕÅÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 15
15 0984/22/O/N/24 © UCLES 2024 BLANK PAGE * 0000800000015 * , , ĬÏĊ®Ġ´íÈõÏĪÅĊàü¶Ă× ĬăÜò×ĞīòäĂþïĒăġ±ùĂ ĥąõÕµµĥĕÕõÕÅąõĥÕÕÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Question paper, page 16
16 0984/22/O/N/24 © UCLES 2024 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 Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge. BLANK PAGE * 0000800000016 * , , ĬÍĊ®Ġ´íÈõÏĪÅĊÞú¶Ą× ĬăÜó×Ĩę÷×Āąø´ßÃáāĂ ĥµåÕõµĥµµÕåÅÅõÅÕÅÕ DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN DO NOT WRITE IN THIS MARGIN
Mark scheme, page 1
This document consists of 14 printed pages. © Cambridge University Press & Assessment 2024 [Turn over Cambridge IGCSE™ (9–1) COMPUTER SCIENCE 0984/22 Paper 2 Algorithms, Programming and Logic October/November 2024 MARK SCHEME Maximum Mark: 75 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 2024 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 2024 © Cambridge University Press & Assessment 2024 Page 2 of 14 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 descriptions 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 2024 © Cambridge University Press & Assessment 2024 Page 3 of 14 Question Answer Marks 1 C 1 Question Answer Marks 2 C 1 Question Answer Marks 3(a) One mark for each correct line Flowchart symbol Purpose 4 subroutine flow terminator decision process
Mark scheme, page 4
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2024 © Cambridge University Press & Assessment 2024 Page 4 of 14 Question Answer Marks 3(b) One mark per mark point • Two labelled terminators START and STOP • Loop initialisation, incrementation and termination • Input with prompt • Total initialised and totalling of inputs • Output with message • Fully correct flowchart with all correct arrows, yes/no labels and symbols 6 Total 0 Count Count + 1 START Count 1 Total Total + Number OUTPUT "Enter a value between 1 and 100" INPUT Number STOP IS Count > 50 ? OUTPUT "The total is ", Total No o Yes
Mark scheme, page 5
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2024 © Cambridge University Press & Assessment 2024 Page 5 of 14 Question Answer Marks 4(a) One mark per mark point • Line 02 / DECLARE Counter : STRING should be DECLARE Counter : INTEGER • Line 09 / Temp TRUE should be Swapped TRUE • Line 10 / WHILE Swapped = TRUE OR Pass <= Limit - 1 DO should be WHILE Swapped = TRUE AND Pass <= Limit - 1 DO • Line 17 / ItemList[Counter] Temp should be ItemList[Counter + 1] Temp • Line 19 / ENDCASE should be ENDIF Correct algorithm: 01 DECLARE ItemList : ARRAY[1:100] OF STRING 02 DECLARE Counter : INTEGER 03 DECLARE Limit : INTEGER 04 DECLARE Pass : INTEGER 05 DECLARE Swapped : BOOLEAN 06 DECLARE Temp : STRING 07 Limit 100 08 Pass 1 09 Swapped TRUE 10 WHILE Swapped = TRUE AND Pass <= Limit - 1 DO 11 Swapped FALSE 12 FOR Counter 1 TO Limit – Pass 13 IF ItemList[Counter] > ItemList[Counter + 1] 14 THEN 15 Temp ItemList[Counter] 16 ItemList[Counter] ItemList[Counter + 1] 17 ItemList[Counter + 1] Temp 18 Swapped TRUE 19 ENDIF 20 Pass Pass + 1 21 NEXT Counter 22 ENDWHILE 5 4(b) One mark per mark point (max three) • The use of a flag (set initially to FALSE) to show if a swap has been made (during the current iteration) • … to stop the loop if it has been sorted • The reduction in the limit of the (inner) loop after each iteration (of the loop) • … to reduce the number of comparisons / iterations required 3
Mark scheme, page 6
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2024 © Cambridge University Press & Assessment 2024 Page 6 of 14 Question Answer Marks 5(a) One mark per mark point (max one) • Design • Coding • Testing 1 5(b) One mark per mark point (max three) • Abstraction • Discard/remove irrelevant information / hiding complexities / keeping the key elements of the problem • Decomposition of the problem • Breaking the problem into inputs, processes and outputs • Identification of the problem • Identification of the requirements of the solution to the problem • Research into the problem by data collection • Example of data collection 3 Question Answer Marks 6 One mark for naming the type of check and one mark for an expansion (max two) • Visual check • … looking at the data that has been entered and either confirming it is correct or showing / correcting errors. OR • Double entry check // Data entered twice • … data is entered twice and the two sets of data are compared (by the computer). If they don’t match, an error has been input, so re-entry is requested. 2
Mark scheme, page 7
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2024 © Cambridge University Press & Assessment 2024 Page 7 of 14 Question Answer Marks 7(a) One mark per mark point (max five) • Correct Value column • Correct Count column • Correct Answer column (down to first OUTPUT (120)) – Shaded grey • Correct Answer column (remaining rows) • Correct OUTPUT column Value Count Answer OUTPUT 5 5 4 20 3 60 2 120 1 120 120 6 6 5 30 4 120 3 360 2 720 1 720 720 −1 5 7(b) One mark for correct answer Example: • It multiplies the input number by one less than itself repeatedly, until the value is 1 • It calculates the number of permutations of all the numbers up to the input value 1 7(c) One mark per mark point (max two) • The program would accept the value and enter the FOR loop • Count would keep reducing by 1 and would never reach 1, as it would already be less than 1 • There would be an endless loop 2
Mark scheme, page 8
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2024 © Cambridge University Press & Assessment 2024 Page 8 of 14 Question Answer Marks 8 One mark per mark point (max four) • 80 • The largest whole number that would be accepted / at the very limit / Boundary/Extreme data that would be accepted / at the very limit • 81 • The smallest whole number that would be rejected / is greater than the limit / Boundary/Abnormal/Erroneous data that would be rejected / is greater than the limit 4 Question Answer Marks 9(a) One mark for each correct gate, with the correct input(s) as shown. P Q X R 4
Mark scheme, page 9
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2024 © Cambridge University Press & Assessment 2024 Page 9 of 14 Question Answer Marks 9(b) Four marks for eight correct outputs Three marks for six or seven correct outputs Two marks for four or five correct outputs One mark for two or three correct outputs P Q R X 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 0 1 1 1 1 4 Question Answer Marks 10 One mark per mark point (max six) • Declaration of appropriate string variable(s) • Input of a line of text • Correct use of LCASE • Correct use of LENGTH • Opening of at least one of the required text files using given names (Main.txt, Lowercase.txt) • Storing of correct line of text to Main.txt • Storing of correct lines to Lowercase.txt • Closing of both text files • Correct output For example: DECLARE LineOfText : STRING DECLARE LowercaseText: STRING INPUT LineOfText OPENFILE Main.txt FOR WRITE WRITEFILE Main.txt, LineOfText CLOSEFILE Main.txt LowercaseText LCASE(LineOfText) OUTPUT LowercaseText, LENGTH(LineOfText) OPENFILE Lowercase.txt FOR WRITE WRITEFILE Lowercase.txt, LowercaseText CLOSEFILE Lowercase.txt 6
Mark scheme, page 10
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2024 © Cambridge University Press & Assessment 2024 Page 10 of 14 Question Answer Marks 11(a) One mark per mark point • Fields – 11 • Records – 15 2 11(b) The Type field contains data that repeats / Data is not unique 1 11(c) Two marks for four correct fields One mark for two or three correct fields Field Data type RoomNo // Type alphanumeric Mon // Tue // Wed // Thu // Fri // Sat // Sun Boolean Rate$ real Guests integer 2 11(d) One mark per mark point • Data from 4 correct columns printed – any number of rows, any order • Data in rows ordered as shown (row and column) at least two rows and two columns required • All data correct with no extra content Correct output 104S Single 1 72.50 105S Single 1 72.50 201F Family 4 160.00 301D Double 2 200.00 304P Suite 6 700.00 3
Mark scheme, page 11
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2024 © Cambridge University Press & Assessment 2024 Page 11 of 14 Question Answer Marks 12 • AO2 (maximum 9 marks) • AO3 (maximum 6 marks) Data Structures required with names as given in the scenario: Arrays or lists Rooms[], Dimensions[] Variables Number Requirements (techniques): R1 Input and store number of rooms, the names of the rooms and their dimensions, including validation of number of rooms (input with prompts, (nested) iteration, use of variables, 1D and 2D arrays, validation). R2 Calculate and store the area of each room, the total area of the house and the average room area rounded to two decimal places. Find the smallest and largest rooms (calculation, totalling, rounding, finding maximum and minimum values, iteration). R3 Output the results, including contents of the arrays and the calculated data (iteration, output). Example 15-mark answer in pseudocode // input and validation of number of rooms REPEAT OUTPUT "How many rooms are in your house (enter a number between 3 and 20 inclusive)?" INPUT Number IF Number < 3 OR Number > 20 THEN OUTPUT "The number of rooms must be between 3 and 20 inclusive, please try again" ENDIF UNTIL Number >= 3 AND Number <= 20 // input of room names and dimensions – could be more than one loop FOR InLoop 1 TO Number OUTPUT "Enter the name of room ", InLoop INPUT Rooms[InLoop] OUTPUT "Enter the length of the room in metres" INPUT Dimensions[InLoop, 1] OUTPUT "Enter the width of the room in metres" INPUT Dimensions[InLoop, 2] Dimensions[InLoop, 3] ROUND(Dimensions[InLoop, 1] * Dimensions[InLoop, 2], 2) NEXT InLoop // calculates total area and average area – rounded values have been stored TotArea 0 FOR Total 1 TO Number TotArea TotArea + Dimensions[Total, 3] NEXT Total AvArea ROUND(TotArea / Number, 2) 15
Mark scheme, page 12
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2024 © Cambridge University Press & Assessment 2024 Page 12 of 14 Question Answer Marks 12 // finding largest and smallest rooms Larea 0 Sarea 100000 Lindex 1 Sindex 1 FOR Count 1 TO Number IF Dimensions[Count, 3] > Larea THEN Larea Dimensions[Count, 3] Lindex Count ENDIF IF Dimensions[Count, 3] < Sarea THEN Sarea Dimensions[Count, 3] Sindex Count ENDIF NEXT Count // outputting the results FOR OutLoop 1 TO Number OUTPUT "Room: ", Rooms[Outloop] OUTPUT "Length: ", Dimensions[OutLoop, 1], " metres" OUTPUT "Width: ", Dimensions[OutLoop, 2], " metres" OUTPUT "Area: ", Dimensions[OutLoop, 3], " square metres" Next OutLoop OUTPUT "The largest room is: ", Rooms[Lindex] OUTPUT "The smallest room is: ", Rooms[Sindex] OUTPUT "The total area of the house is: ", TotArea, " square metres" OUTPUT "The average area of the rooms is: ", AvArea, " square metres"
Mark scheme, page 13
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2024 © Cambridge University Press & Assessment 2024 Page 13 of 14 Marking Instructions in italics AO2: Apply knowledge and understanding of the principles and concepts of computer science to a given context, including the analysis and design of computational or programming problems 0 1–3 4–6 7–9 No creditable response. At least one programming technique has been used. Any use of selection, iteration, counting, totalling, input and output. Some programming techniques used are appropriate to the problem. More than one technique seen applied to the scenario, check list of techniques needed. The range of programming techniques used is appropriate to the problem. All criteria stated for the scenario have been covered by the use of appropriate programming techniques, check list of techniques needed. Some data has been stored but not appropriately. Any use of variables or arrays or other language dependent data structures e.g. Python lists. Some of the data structures chosen are appropriate and store some of the data required. More than one data structure used to store data required by the scenario. The data structures chosen are appropriate and store all the data required. The data structures used store all the data required by the scenario.
Mark scheme, page 14
0984/22 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED October/November 2024 © Cambridge University Press & Assessment 2024 Page 14 of 14 Marking Instructions in italics AO3: Provide solutions to problems by: • evaluating computer systems • making reasoned judgements • presenting conclusions 0 1–2 3–4 5–6 No creditable response. Program seen without relevant comments. Program seen with some relevant comment(s). The program has been fully commented. Some identifier names used are appropriate. Some of the data structures used have meaningful names. The majority of identifiers used are appropriately named. Most of the data structures used have meaningful names. Suitable identifiers with names meaningful to their purpose have been used throughout. All of the data structures used have meaningful names. The solution is illogical. The solution contains parts that may be illogical. The program is in a logical order. The solution is inaccurate in many places. Solution contains few lines of code with errors that attempt to perform a task given in the scenario. The solution contains parts that are inaccurate. Solution contains lines of code with some errors that logically perform tasks given in the scenario. Ignore minor syntax errors. The solution is accurate. Solution logically performs all the tasks given in the scenario. Ignore minor syntax errors. The solution attempts at least one of the requirements. Solution contains lines of code that attempt at least one task given in the scenario. The solution attempts to meet most of the requirements. Solution contains lines of code that attempts most tasks given in the scenario. The solution meets all the requirements given in the question. Solution performs all the tasks given in the scenario.
What you needed in this session
Cambridge’s own grade thresholds for 2024 Oct/Nov, Paper 2 · Variant 2. A higher threshold means an easier paper — the bar moves with how the cohort did.