Cambridge IGCSE Computer Science (9-1) 0984 — 2022 May/June Paper 2 · Variant 1
0984/21/M/J/22 · 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 paper12 pages












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













Paper as text
Question paper, page 1
This document has 12 pages. [Turn over Cambridge IGCSE™(9–1) DC (LK) 311520 © UCLES 2022 * 1 2 9 1 5 4 1 4 4 3 * COMPUTER SCIENCE 0984/21 Paper 2 Problem-solving and Programming May/June 2022 1 hour 45 minutes You must answer on the question paper. No additional materials are needed. INSTRUCTIONS ● Answer all questions. ● Do not attempt Tasks 1, 2 and 3 in the copy of the pre-release material on page 2; these are for information only. ● 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 50. ● 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.
Question paper, page 2
2 0984/21/M/J/22 © UCLES 2022 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 following tasks before the examination to answer Question 1. Pre-release material Friends of Seaview Pier is an organisation devoted to the restoration and upkeep of a pier in the town. A pier is a wooden structure that provides a walkway over the sea. The pier requires regular maintenance and the friends of the pier need to raise money for this purpose. Members of Friends of Seaview Pier each pay $75 per year, as a contribution to the pier’s running costs. This entitles them to free admission to the pier throughout the year. They can also volunteer to help run the pier, by working at the pier entrance gate, working in the gift shop, or painting and decorating. To provide additional income, the pier’s wooden planks can be sponsored. A brass plaque, which contains a short message of the sponsor’s choice, is fitted to a plank on the pier, for a donation of $200. Write and test a program or programs for the Friends of Seaview Pier: • Your program or programs must include appropriate prompts for the entry of data. Data must be validated on entry. • All outputs, including error messages, 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 – becoming a member of Friends of Seaview Pier Set up a system to enable people to become members of Friends of Seaview Pier and for each new member enter: • their first name and last name • whether or not they wish to work as a volunteer ○ if they choose to volunteer, identify the area from: – the pier entrance gate – the gift shop – painting and decorating • the date of joining • whether or not they have paid the $75 fee. All of this information needs to be stored using suitable data structures. Task 2 – using the membership data Extend the program in Task 1 so that a list of the first and last names of members can be output in any of the following categories: • Members who have chosen to work as volunteers. • Volunteers who would like to work at the pier entrance gate. • Volunteers who would like to work in the gift shop. • Volunteers who would like to help with painting and decorating tasks. • Members whose membership has expired (they have not re-joined this year). • Members who have not yet paid their $75 fee. Task 3 – sponsoring a wooden plank Add an additional option to the program in Task 1 to enable the pier’s wooden planks to be sponsored. Separate data structures should be used to store the names of the individuals and the short messages they would like to have written on their brass plaque. An output would display everything that was input for the sponsor to confirm. If errors are found, the program should allow data to be re-entered. Once complete, the data is stored and the sponsor is charged $200.
Question paper, page 3
3 0984/21/M/J/22 © UCLES 2022 [Turn over 1 (a) Describe the data structures you could have used in Task 1. Your description should include types of data structure, names used for data structures, their uses and examples of sample data. … … … … … … … … … … [5] (b) Explain how you could change your program in Task 1 to total all the money collected from new members who have paid. … … … … … … [3] (c) Describe how data input in Task 1 could be validated to find out if a new member wants to work as a volunteer. … … … … … … [3]
Question paper, page 4
4 0984/21/M/J/22 © UCLES 2022 (d) Write an algorithm to show how your program completes Task 3 assuming the option to sponsor a wooden plank has been chosen, using pseudocode, programming statements or a flowchart. Details completed in Task 1 are not required. … … … … … … … … … … … … … … … … … … … … … … … … … …
Question paper, page 5
5 0984/21/M/J/22 © UCLES 2022 [Turn over … … … … … … … … … … … … … … … … … … … … … … … … … … … … [5]
Question paper, page 6
6 0984/21/M/J/22 © UCLES 2022 (e) Explain how your program allows any one of the member or volunteer lists to be selected and displayed (part of Task 2). Any programming statements used in your answer must be fully explained. … … … … … … … … … … … … … … … … [4]
Question paper, page 7
7 0984/21/M/J/22 © UCLES 2022 [Turn over Section B 2 Tick (ü) one box in each row to identify the most appropriate data type for each description. Only one tick (ü) per column. Description Data type Boolean Char Integer Real String a single character from the keyboard multiple characters from the keyboard only one of two possible values only whole numbers any number [4] 3 Give one piece of normal test data and one piece of erroneous test data that could be used to validate the input of an email address. State the reason for your choice in each case. Normal test data … … Reason … … … … Erroneous test data … … Reason … … … … [4]
Question paper, page 8
8 0984/21/M/J/22 © UCLES 2022 4 The flowchart shows an algorithm that should allow 60 test results to be entered into the variable Score. Each test result is checked to see if it is 50 or more. If it is, the test result is assigned to the Pass array. Otherwise, it is assigned to the Fail array. (a) Complete this flowchart: START PassCount 0 END Yes FailCount 0 Count 0 Count Count + 1 Yes No No [6]
Question paper, page 9
9 0984/21/M/J/22 © UCLES 2022 [Turn over (b) Write a pseudocode routine that will check that each test result entered into the algorithm is between 0 and 100 inclusive. … … … … … … … … … … [4]
Question paper, page 10
10 0984/21/M/J/22 © UCLES 2022 5 The pseudocode represents an algorithm. The pre-defined function DIV gives the value of the result of integer division. For example, Y = 9 DIV 4 gives the value Y = 2 The pre-defined function MOD gives the value of the remainder of integer division. For example, R = 9 MOD 4 gives the value R = 1 First ← 0 Last ← 0 INPUT Limit FOR Counter ← 1 TO Limit INPUT Value IF Value >= 100 THEN IF Value < 1000 THEN First ← Value DIV 100 Last ← Value MOD 10 IF First = Last THEN OUTPUT Value ENDIF ENDIF ENDIF NEXT Counter (a) Complete the trace table for the algorithm using this input data: 8, 66, 606, 6226, 8448, 642, 747, 77, 121 Counter Value First Last Limit OUTPUT [5]
Question paper, page 11
11 0984/21/M/J/22 © UCLES 2022 [Turn over (b) Describe the purpose of the algorithm. … … … … [2]
Question paper, page 12
12 0984/21/M/J/22 © UCLES 2022 6 A computer game shop records its stock levels in a database table called GAMES. The fields used in the stock table are shown. Name Description GameID primary key GameName the name of each game AgeRestriction the minimum age at which a person is allowed to play each game GamePrice the selling price for each game NumberStock the quantity of each game currently in stock OnOrder whether or not each game is on order from the suppliers DateLastOrdered the date the most recent order for each game was placed GameDescription a summary of the contents and purpose of each game (a) State the number of fields that are in the table GAMES. … [1] (b) State one important fact that must be true for a field to be a primary key. … … [1] (c) Complete the query-by-example grid to output all the games that have no stock and that are on order with the supplier. Display only the GameID, GameName and GamePrice fields in alphabetical order of the name of the game. Field: Table: Sort: Show: Criteria: or: [3] 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.
Mark scheme, page 1
This document consists of 13 printed pages. © UCLES 2022 [Turn over Cambridge IGCSE™ (9–1) COMPUTER SCIENCE 0984/21 Paper 2 Problem Solving and Programming May/June 2022 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 May/June 2022 series for most Cambridge IGCSE, Cambridge International A and AS Level and Cambridge Pre-U components, and some Cambridge O Level components.
Mark scheme, page 2
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 2 of 13 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.
Mark scheme, page 3
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 3 of 13 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 4
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 4 of 13 Please note the following further points: The words in bold in the mark scheme are important text that needs to be present, or some notion of it needs to be present. It does not have to be the exact word, but something close to the meaning. If a word is underlined, this exact word must be present. A single forward slash means this is an alternative word. A double forward slash means that this is an alternative mark point. Ellipsis (…) on the end of one-mark point and the start of the next means that the candidate cannot get the second mark point without being awarded the first one. If a mark point has an ellipsis at the beginning, but there is no ellipsis on the mark point before it, then this is just a follow-on sentence and can be awarded without the previous mark point.
Mark scheme, page 5
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 5 of 13 Question Answer Marks Section A 1(a) One mark per mark point, max five Data Structure(s), max two MP1 arrays MP2 variable(s) / constant(s) Further description, max three MP3 name(s) one or more MP4 sample data for appropriate arrays or variables MP5 use(s) one or more Additional data structure description using the same data structure type, max one MP6 two or more full descriptions of the data structure including name, sample data and use For example: An array (1) named FirstName (1) to store the first names of the members (1) such as James (1). A variable (1) could also be used to enter whether or not they wish to volunteer. (5 marks) A variable (1) named FirstName (1) to input the first names of the members (1) such as James (1). A variable could also be used to enter whether or not they wish to volunteer, with sample data of ‘yes’ (1). (5 marks) Task 1 – becoming a member of Friends of Seaview Pier Set up a system to enable people to become members of Friends of Seaview Pier and for each new member enter: their first name and last name whether or not they wish to work as a volunteer – if they choose to volunteer, identify the area from: o the pier entrance gate o the gift shop o painting and decorating the date of joining whether or not they have paid the $75 fee. All of this information needs to be stored using suitable data structures. 5
Mark scheme, page 6
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 6 of 13 Question Answer Marks 1(b) Explanation of how each was done. Code is allowed, but must be fully explained. One mark per mark point, max three MP1 add/use a (new) variable/array to total the membership fee money // total number of members who have paid MP2 initialise the totalling variable to 0 at the start of the program MP3 check whether the new member has paid the $75 fee using a conditional statement MP4 …if they have paid, and the amount paid is being totalled, add 75 to the current running total of the membership fee total MP5 …if they have paid, and the number of paid members is being totalled, add 1 to the total number of members who have paid MP6 …if they have paid, and the number of paid members is being totalled, multiply total by 75, to give total paid. 3 1(c) Any code must include a description of what it is for. One mark per mark point, max three Max two for just naming different appropriate validation checks MP1 apply a presence check // to ensure that data has been entered (to the question do you want to work as a volunteer?) MP2 apply a type check // to ensure that data has been entered of the correct data type e.g. integer if the response required is 1 or 0 MP3 checking the valid inputs would be either yes or no // apply a check to ensure that the data matches the expected input MP4 the valid inputs would be to choose in which area the new member wishes to volunteer e.g. a list of areas MP5 if input is not valid, an error message is output (and a new input is requested) MP6 if input is valid, the program continues 3
Mark scheme, page 7
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 7 of 13 Question Answer Marks 1(d) One mark per mark point, max five MP1 input for sponsor’s name / name taken from previous data // input for message on plaque MP2 both inputs correct with appropriate prompts // input for message on plaque correct with appropriate prompt and name taken from previous data MP3 output of input(s) for confirmation … MP4 … method for sponsor to confirm that the input(s) are correct MP5 method to enable re-entry of message on plaque if errors made MP6 charge of $200 acknowledged / charged / confirmed / displayed MP7 (name and) message stored in arrays MP8 array index incremented for next sponsor Task 3 – sponsoring a wooden plank Add an additional option to the program in Task 1 to enable the pier’s wooden planks to be sponsored. Separate data structures should be used to store the names of the individuals and the short messages they would like to have written on their brass plaque. An output would display everything that was input for the sponsor to confirm. If errors are found, the program should allow data to be re-entered. Once complete, the data is stored and the sponsor is charged $200. Example answer ArrayIndex 0 //initial array's index Check "N" WHILE Check <> "Y" OUTPUT "Enter your name" INPUT Name OUTPUT "Enter the message you would like on your brass plaque" INPUT Message OUTPUT "The data you have entered is, name: ", Name, " and your message for the plaque is: ", Message OUTPUT "Is this correct (Y or N)" INPUT Check IF Check <> "Y" THEN OUTPUT "The data entered is incorrect, please re-enter" ENDIF ENDWHILE 5
Mark scheme, page 8
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 8 of 13 Question Answer Marks 1(d) PlankName[ArrayIndex] Name Message[ArrayIndex] Message ArrayIndex ArrayIndex + 1 OUTPUT "The fee for this service is $200" //some method of paying the fee or acknowledgement of the fee 1(e) Explanation of how each was done. Code is allowed, but must be fully explained. One mark per mark point, max four MP1 a menu is provided/options are displayed so that the user can choose which of the lists they wish to see MP2 the user inputs a number/code as shown on the menu corresponding to their menu choice MP3 attempt to validate input MP4 … if it does not match an option, give an error message and ask for re-input MP5 … if it matches an option, a range of IF statements/conditional statements/CASE statement are/is used to compare the input with the available options MP6 … output the chosen list e.g. using a loop to output the contents of the appropriate first and second name arrays corresponding to the user input MP7 identification of empty list and appropriate action Task 2 – using the membership data Extend the program in Task 1 so that a list of the first and last names of members can be output in any of the following categories: Members who have chosen to work as volunteers. Volunteers who would like to work at the pier entrance gate. Volunteers who would like to work in the gift shop. Volunteers who would like to help with painting and decorating tasks. Members whose membership has expired (they have not re-joined this year). Members who have not yet paid their $75 fee. 4
Mark scheme, page 9
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 9 of 13 Question Answer Marks Section B 2 Four marks for five correct rows Three marks for four correct rows Two marks for three correct rows One marks for two correct rows Description Data type Boolean Char Integer Real String a single character from the keyboard multiple characters from the keyboard only one of two possible values only whole numbers any number 4 Question Answer Marks 3 One mark per mark point, max four Normal test data computerscience@cambridge.org.uk Reason this is a valid email address (containing the @ symbol) and should be accepted Erroneous test data computerscienceisgreat Reason this is just a string, and should be rejected (as an email address needs a single ’@’) 4
Mark scheme, page 10
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 10 of 13 Question Answer Marks 4(a) One mark per mark point, max six MP1 input box MP2 correct check of Score MP3 assign Score to Pass correctly MP4 assign Score to Fail correctly MP5 increment both array counters MP6 correct check of number of scores 6 IS Count = 60? END Yes No No Fail[FailCount] Score FailCount FailCount + 1 Pass[PassCount] Score PassCount PassCount + 1 Count Count + 1 IS Score >= 50? Count 0 INPUT Score FailCount 0 START PassCount 0 Yes
Mark scheme, page 11
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 11 of 13 Question Answer Marks 4(b) One mark per mark point, max four MP1 appropriate conditional loop structure MP2 correct identification of invalid input MP3 appropriate error message MP4 repeated input of score until correct WHILE Score < 0 OR Score > 100 (DO) OUTPUT "Your entry must be between 0 and 100, inclusive, please try again " INPUT Score ENDWHILE Or: REPEAT IF Score < 0 OR Score > 100 THEN OUTPUT "Your entry must be between 0 and 100, inclusive, please try again " INPUT Score ENDIF UNTIL Score >= 0 AND Score <= 100 4
Mark scheme, page 12
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 12 of 13 Question Answer Marks 5(a) One mark per mark point, max five MP1 correct Counter and Limit columns MP2 correct Value column MP3 correct First column MP4 correct Last column MP5 correct OUTPUT Counter Value First Last Limit OUTPUT 0 0 8 1 66 2 606 6 6 606 3 6226 4 8448 5 642 6 2 6 747 7 7 747 7 77 8 121 1 1 121 5
Mark scheme, page 13
0984/21 Cambridge IGCSE (9–1) – Mark Scheme PUBLISHED May/June 2022 © UCLES 2022 Page 13 of 13 Question Answer Marks 5(b) One mark per mark point, max two checks for / outputs 3-digit numbers … where the first and last digit are the same 2 Question Answer Marks 6(a) 8 1 6(b) The primary key field must be unique/different for each record in the table 1 6(c) One mark per mark point, max three correct fields and table named correctly correct sort and show box rows correct search criteria Field: GameID GameName GamePrice NumberStock OnOrder Table: GAMES GAMES GAMES GAMES GAMES Sort: Ascending Show: Criteria: =0 ="Y" or: 3
What you needed in this session
Cambridge’s own grade thresholds for 2022 May/June, Paper 2 · Variant 1. A higher threshold means an easier paper — the bar moves with how the cohort did.