Cambridge A Level Computer Science 9608 — 2020 Oct/Nov Paper 4 · Variant 3
9608/43/O/N/20 · 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 paper20 pages




















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















Paper as text
Question paper, page 1
Cambridge International AS & A Level DC (SLM) 207355 © UCLES 2020 [Turn over This document has 20 pages. Blank pages are indicated. COMPUTER SCIENCE 9608/43 Paper 4 Further Problem-solving and Programming Skills October/November 2020 2 hours You must answer on the question paper. No additional materials are needed. INSTRUCTIONS ● Answer all questions. ● Use a black or dark blue pen. ● 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. ● You may use an HB pencil for any diagrams, graphs or rough working. ● 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. * 6 9 2 8 6 5 3 9 7 3 *
Question paper, page 2
2 9608/43/O/N/20 © UCLES 2020 1 A company is implementing a new software system for their latest product. Developing the software will include the following activities: Activity Description Time to complete (weeks) Predecessor A Identify requirements 1 – B Produce design 3 A C Write code 6 B D Test modules 4 B E Integration testing 2 D F Final system black-box testing 2 E G Install software 1 F H Acceptance testing 2 G I Create user documentation 2 G J Create training documents 3 G K Pilot implementation 4 H Complete the GANTT chart to correspond with the given table. A B C D E F G H I J K Week number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [5]
Question paper, page 3
3 9608/43/O/N/20 © UCLES 2020 [Turn over 2 There are several different types of testing. (a) Tick (3) one or more boxes in each row to indicate whether each statement applies to Integration, Acceptance, Alpha or Beta testing. Statement Integration Acceptance Alpha Beta Software is tested in-house by dedicated testers Software is tested by the client before it is signed off Software is tested by combining modules that have previously been tested to check they work as expected Software is tested using normal, abnormal and boundary data Software is tested by releasing it to selected customers, who test it in normal circumstances [4] (b) Identify one other method of testing. … [1]
Question paper, page 4
4 9608/43/O/N/20 © UCLES 2020 3 A programmer is creating a program for a puzzle competition. The programmer has designed the PuzzlePlayer class to store details for each player, including the player’s score. The following diagram shows the design for the PuzzlePlayer class. PuzzlePlayer PlayerID : STRING // initialised in constructor to "PL12a3" Name : STRING // initialised in constructor to "" Score : INTEGER // initialised in constructor to 0 Constructor() // method used to create an instance of the // PuzzlePlayer class and initialise its attributes GetPlayerID() // returns PlayerID GetName() // returns Name GetScore() // returns Score SetPlayerID() // validates the parameter value to make sure it // is 6 characters in length and starts with // "PL", then sets PlayerID to this value SetName() // sets the Name to the parameter value SetScore() // sets the Score to the parameter value (a) Write program code for the Constructor() method. Use the appropriate constructor method for your chosen programming language. Programming language … Program code … … … … … … … … … … [2]
Question paper, page 5
5 9608/43/O/N/20 © UCLES 2020 [Turn over (b) Write program code for GetPlayerID() method. Programming language … Program code … … … … … … [2] (c) The method SetPlayerID() validates the parameter value. It checks that it is 6 characters in length and that the first two characters are "PL". The method sets PlayerID to the parameter value. It returns TRUE if the parameter value is valid and FALSE if it is not valid. The function Length(Variable) returns the length of the string stored in Variable as an integer. The function Substring(Variable, StartingCharacter, NumberOfCharacters) can be used to return one or more characters from a string. The first character position in a string is 0. For example, when the string "Computer" is stored in the variable Message: Substring(Message,1,1) would return the character "o". Write pseudocode for the SetPlayerID() method. … … … … … … … … … … … … [5]
Question paper, page 6
6 9608/43/O/N/20 © UCLES 2020 (d) The program uses object-oriented programming to store the puzzles. One type of puzzle is a quiz that consists of several questions. The two classes, Quiz and Question, are defined. The class diagram shows parts of these classes. Quiz QuizName : STRING // initialised in constructor to // parameter Difficulty : STRING // initialised in constructor to // parameter QuizQs : ARRAY[] OF Question // defined with the number of // questions passed as a parameter, // declared as an array of objects // of class Question Constructor() // method used to create an instance of the // Quiz class and initialise its attributes … … Question Question : STRING Difficulty : STRING Answer : STRING Constructor() // method used to create an instance of the // Question class and initialise its attributes … … (i) Explain what is meant by containment, using an example from the class diagram. … … … … [2] (ii) Classes, objects and containment are all features of object-oriented programming. Identify and describe one other feature of object-oriented programming. … … … … [2]
Question paper, page 7
7 9608/43/O/N/20 © UCLES 2020 [Turn over (iii) The main program stores the collection of quizzes in the array QuizBank that can store 100 objects. Define the array QuizBank using pseudocode. … … [1] (iv) A new quiz is created with the name ‘Famous people’. The difficulty level is ‘Low’ and it consists of 10 questions. Write program code to declare the quiz object and store it in the first element in QuizBank. Programming language … Program code … … [2]
Question paper, page 8
8 9608/43/O/N/20 © UCLES 2020 4 A declarative programming language is used to represent the following knowledge base. 01 type(cheddar). 02 type(brie). 03 type(paneer). 04 type(parmesan). 05 country(england). 06 country(france). 07 country(india). 08 country(italy). 09 hard(parmesan). 10 soft(brie). 11 strong_smell(brie). 12 strong_smell(cheddar). 13 origin(brie, france). These clauses have the following meanings: Clause Meaning 02 Brie is a type of cheese 06 France is a country 09 Parmesan is a hard cheese 10 Brie is a soft cheese 12 Cheddar has a strong smell 13 Brie is from France (a) Camembert is a type of soft cheese from France and has a strong smell. Write additional clauses to represent this information. 14 … 15 … 16 … 17 … [4]
Question paper, page 9
9 9608/43/O/N/20 © UCLES 2020 [Turn over (b) Stilton (X) could be from England (Y) and Stilton could be a hard cheese, if Stilton is a type of cheese, England is a country and Stilton is not a soft cheese. Write this as a rule. Cheese_Question(X, Y) IF … … … [4]
Question paper, page 10
10 9608/43/O/N/20 © UCLES 2020 5 There are several sorting algorithms. One type of sorting algorithm is an insertion sort. (a) Explain how an insertion sort puts a set of data into ascending order. … … … … … … … … … … [4] (b) The following algorithm performs a bubble sort. It is currently incomplete. Complete the algorithm. Counter NumberOfItems – 2 REPEAT DataSwapped FALSE FOR CurrentValue 0 TO …………………………………………………………… IF DataList[CurrentValue] > DataList[CurrentValue + 1] THEN ValueTemp DataList[……………………………………………………………] DataList[CurrentValue] DataList[CurrentValue + 1] DataList[CurrentValue + 1] ………………………………………………………… DataSwapped …………………………………………………………… ENDIF ENDFOR UNTIL DataSwapped = …………………………………………………………… [5]
Question paper, page 11
11 9608/43/O/N/20 © UCLES 2020 [Turn over 6 Consider the following diagram that represents a linked list: Data Pointer A B C D Ø The symbol Ø represents a null pointer. (a) A new node with the data value E is added between the nodes that have the data values B and C. Show the state of the linked list after the node with the data value E is added. [2] (b) State why the node with the data value D has a null pointer. … … [1]
Question paper, page 12
12 9608/43/O/N/20 © UCLES 2020 (c) A 1D array, LinkedList, is used to implement the linked list. The array is declared as a record data type with two fields, Data and Pointer. The global variable StartPointer stores the index of the first node in the list. (i) The following pseudocode algorithm finds a value in a linked list. The algorithm is incomplete. The function FindValue(), takes as a parameter, the value to be searched for in the linked list. The function follows the pointers in the linked list. It either returns -1 if the value is not found, or it returns the pointer to the value if it is found. Complete the algorithm. FUNCTION FindValue(Value : INTEGER) …………………………………………………… DECLARE CurrentPointer : INTEGER CurrentPointer StartPointer WHILE ………………………………………………… <> NULL AND LinkedList[CurrentPointer]. …………………………………… <> ………………………………………… CurrentPointer LinkedList[……………………………………………………].Pointer ENDWHILE IF LinkedList[CurrentPointer].Data = Value THEN RETURN …………………………………………………… ELSE RETURN -1 ENDIF ENDFUNCTION [6]
Question paper, page 13
13 9608/43/O/N/20 © UCLES 2020 [Turn over (ii) The function DeleteNode() takes the data to be removed from LinkedList as a parameter. The function starts at the first node and follows the pointers to check the data in each node. If the data is found, it removes the node containing that data, updates the pointer and returns TRUE. Otherwise, it returns FALSE. Write pseudocode for DeleteNode(). … … … … … … … … … … … … … … … … … … … … … … …
Question paper, page 14
14 9608/43/O/N/20 © UCLES 2020 … … … … … … … … … … … … [7]
Question paper, page 15
15 9608/43/O/N/20 © UCLES 2020 [Turn over BLANK PAGE
Question paper, page 16
16 9608/43/O/N/20 © UCLES 2020 7 The following table shows part of the instruction set for a processor that has one general purpose register, the Accumulator (ACC), and an Index Register (IX). Instruction Explanation Op code Operand LDM #n Immediate addressing. Load the number n to ACC. LDD <address> Direct addressing. Load the contents of the location at the given address to ACC. LDI <address> Indirect addressing. The address to be used is at the given address. Load the contents of this second address to ACC. LDX <address> Indexed addressing. Form the address from <address> + the contents of the Index Register. Copy the contents of this calculated address to ACC. LDR #n Immediate addressing. Load the number n to IX. STO <address> Store the contents of ACC at the given address. STX <address> Indexed addressing. Form the address from <address> + the contents of the Index Register. Copy the contents of ACC to this calculated address. ADD <address> Add the contents of the given address to ACC. INC <register> Add 1 to the contents of the register (ACC or IX). DEC <register> Subtract 1 from the contents of the register (ACC or IX). JMP <address> Jump to the given address. CMP <address> Compare the contents of ACC with the contents of <address>. CMP #n Compare the contents of ACC with number n. JPE <address> Following a compare instruction, jump to <address> if the compare was True. JPN <address> Following a compare instruction, jump to <address> if the compare was False. IN Key in a character and store its ASCII value in ACC. OUT Output to the screen the character whose ASCII value is stored in ACC. END Return control to the operating system. The assembly language program in the table on the opposite page allows a username to be input as a string of up to 8 characters in length. For strings of less than 8 characters, the user enters the exclamation mark (!) character to indicate that no more characters will be entered. The exclamation mark is not saved as part of the username. The program then outputs each character of the username in the order input. The program will use consecutive memory locations, starting at the address labelled USERNAME, storing one character in each location.
Question paper, page 17
17 9608/43/O/N/20 © UCLES 2020 [Turn over The program in the table is incomplete. The comment column contains descriptions for some program instructions. Complete the program using the given instruction set. Label Instruction Comment Op code Operand LDR #0 LDM #0 // initialise LENGTH to 0 STO LENGTH LOOP: IN // is character = EXCLAMATION(!)? // if TRUE, jump to OUTPUT // store character in USERNAME + contents of IX INC IX // increment Index Register // increment LENGTH // is LENGTH = MAX ? // if FALSE, jump to LOOP OUTPUT: LDR #0 // initialise COUNT to 0 LDX USERNAME OUT INC IX LDD COUNT INC ACC // increment COUNT STO COUNT // is COUNT = LENGTH ? JPN OUTPUT END // end program LENGTH: EXCLAMATION: B0010001 MAX: 8 COUNT: USERNAME: [8]
Question paper, page 18
18 9608/43/O/N/20 © UCLES 2020 8 Recursion can be used when writing computer programs. Consider the following pseudocode algorithm. 01 FUNCTION NumberPattern(Value1, Value2, EndValue : INTEGER) RETURNS INTEGER 02 OUTPUT Value1 03 IF Value1 <= EndValue 04 THEN 05 Temp Value2 06 Value2 Value1 07 Value1 Value1 + Temp 08 RETURN NumberPattern(Value1, Value2, EndValue) + 1 09 ELSE 10 RETURN 0 11 ENDIF 12 ENDFUNCTION (a) State the line number in the pseudocode algorithm that shows function NumberPattern() is recursive. Justify your choice. Line number … Justification … … … [2]
Question paper, page 19
19 9608/43/O/N/20 © UCLES 2020 (b) The function is called as follows: NumberPattern(1,1,12) Dry run the algorithm and complete the following trace table. State the final value returned. Show your working. Value1 Value2 Temp EndValue OUTPUT RETURN value Final value returned … Working … … … … … … … [5] (c) State the purpose of the algorithm. … … [1]
Question paper, page 20
20 9608/43/O/N/20 © UCLES 2020 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 15 printed pages. © UCLES 2020 [Turn over Cambridge International AS & A Level COMPUTER SCIENCE 9608/43 Paper 4 Written Paper October/November 2020 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 2020 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
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 2 of 15 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
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 3 of 15 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
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 4 of 15 Question Answer Marks 1 A B C D E F G H I J K Week number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 • A(1) and B(3) following A • C(6) following B and D(4) following B • E(2) following D, F(2) following E, G(1) following F • H(2) following G, I(2) following G, J(3) following G • K(4) following H 5
Mark scheme, page 5
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 5 of 15 Question Answer Marks 2(a) Statement Integration Acceptance Alpha Beta Software is tested in-house by dedicated testers () Software is tested by the client before it is signed-off Software is tested by combining modules that have previously been tested to check they work as expected. Software is tested using normal, abnormal and boundary data. () Software is tested by releasing it to selected customers, who test it in normal circumstances 4 2(b) One from: • dry run • walkthrough • white-box • black-box 1
Mark scheme, page 6
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 6 of 15 Question Answer Marks 3(a) • Correct header and close (where applicable) with no parameters … • …Correct values assigned to correct identifiers PYTHON def __init__(self): self.__PlayerID = "PL12a3" self.__Name = "" self.__Score = 0 PASCAL Constructor PuzzlePlayer.Create(); begin PlayerID := 'PL12a3'; Name: = ''; Score := 0; end; VB Public Sub New() PlayerID = "PL12a3" Name = "" Score = 0 End Sub 2
Mark scheme, page 7
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 7 of 15 Question Answer Marks 3(b) • Correct function header and close (where applicable) no parameter (if returns value must be string) • Returns correct value PlayerID PYTHON def GetPlayerID(self): return(self.__PlayerID) PASCAL Function GetPlayerID() : String; Begin GetPlayerID := PlayerID; End; VB public function GetPlayerID() return(PlayerID) End Function 2
Mark scheme, page 8
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 8 of 15 Question Answer Marks 3(c) • Function header (and close), value passed as parameter (returning Boolean/String if present) • Checks parameter is 6 characters in length • AND checks the first two characters in parameter are "PL" • …Returns true if parameter is valid and stores in PlayerID • …Returns false if parameter is not valid (and stores in PlayerID or not) FUNCTION SetPlayerID(NewPlayerID) RETURNS BOOLEAN DECLARE Valid : BOOLEAN Valid ← TRUE IF Length(NewPlayerID) = 6 AND Substring(NewPlayerID,0,2) = "PL" THEN PlayerID ← NewPlayerID ELSE Valid ← FALSE ENDIF RETURN Valid ENDFUNCTION 5 3(d)(i) • A class contains objects/instances of another class • Quiz class has objects of type Question class // The objects/items in the array QuizQs have the attributes/methods of the class Question // The array QuizQs is of data type class Question 2 3(d)(ii) e.g. • Inheritance • A child class can use attributes/methods from the parent class • Polymorphism • A child class can overwrite the methods of the parent class 2 3(d)(iii) • Correct identifier, 100 elements, type Quiz and clearly array (i.e. brackets) DECLARE QuizBank : ARRAY[0:99] OF Quiz 1
Mark scheme, page 9
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 9 of 15 Question Answer Marks 3(d)(iv) • Instance of object and assignment to first element of array (0 or 1) • Correct parameters (in any order) PYTHON QuizBank[0] = Quiz("Famous people", "Low", 10) PASCAL QuizBank[0] := Quiz.Create('Famous people', 'Low', 10); VB QuizBank[0] = New Quiz ("Famous people", "Low", 10) 2 Question Answer Marks 4(a) • type(camembert) • soft(camembert) • strong_smell(camembert) • origin(camembert, france) 4 4(b) • type(X) • AND country(Y) • AND NOT • soft(X) IF type (X) AND country (Y) AND NOT soft(X) 4
Mark scheme, page 10
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 10 of 15 Question Answer Marks 5(a) Four from: • Uses a sorted and unsorted list • Takes first value and makes it sorted list // compare second item to first item • Find location of next value in the sorted list • …description of suitable method (e.g. switching values, taking value out, comparing with sorted values) • Insert item in correct position in sorted list • Repeat until all items are in the sorted list (dependent on suitable method) 4 5(b) Counter ← NumberOfItems – 2 REPEAT DataSwapped ← FALSE FOR CurrentValue ← 0 TO Counter // NumberOfItems – 2 IF DataList[CurrentValue] > DataList[CurrentValue + 1] THEN ValueTemp ← DataList[CurrentValue] DataList[CurrentValue] ← DataList[CurrentValue + 1] DataList[CurrentValue + 1] ← ValueTemp DataSwapped ← TRUE ENDIF ENDFOR UNTIL DataSwapped = FALSE 5 Question Answer Marks 6(a) • A–B–E • E–C–D with D null pointer 2 6(b) It indicates the end of the list // it doesn’t point anywhere/to any data/to another node 1
Mark scheme, page 11
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 11 of 15 Question Answer Marks 6(c)(i) FUNCTION FindValue(Value : INTEGER) RETURNS INTEGER DECLARE CurrentPointer : INTEGER CurrentPointer ← StartPointer WHILE CurrentPointer <> NULL AND LinkedList[CurrentPointer].Data <> Value CurrentPointer ← LinkedList[CurrentPointer].Pointer ENDWHILE IF LinkedList[CurrentPointer].Data = Value THEN RETURN CurrentPointer ELSE RETURN −1 ENDIF ENDFUNCTION 6
Mark scheme, page 12
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 12 of 15 Question Answer Marks 6(c)(ii) One mark per bullet point to max 7 • Function header, taking parameter (and returning Boolean) • Assign a new pointer to StartPointer • Iterate/recursive calls through nodes correctly updating current pointer • Checking for empty list and returning FALSE • Checking if end of list … • … check data in last node • Checking if data found… • … set pointer of found node to NULL (return to free chain) • … if found update previous node pointer to NULL • … return TRUE • If end of list and not found then return FALSE FUNCTION DeleteNode(NodeData : STRING) RETURNS BOOLEAN IF StartPointer = NULL THEN RETURN FALSE ELSE CurrentPointer ← StartPointer IF LinkedList[CurrentPointer].Data = NodeData THEN StartPointer ← LinkedList[CurrentPointer].Pointer RETURN TRUE ELSE PreviousPointer ← CurrentPointer WHILE CurrentPointer <> NULL AND LinkedList[CurrentPointer].Data <> NodeData PreviousPointer ← CurrentPointer CurrentPointer ← LinkedList[CurrentPointer].Pointer ENDWHILE 7
Mark scheme, page 13
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 13 of 15 Question Answer Marks 6(c)(ii) IF CurrentPointer = NULL THEN IF LinkedList[CurrentPointer].Data = NodeData THEN LinkedList[PreviousPointer].Pointer ← NULL RETURN TRUE ELSE RETURN FALSE ENDIF ELSE IF LinkedList[CurrentPointer].Data = NodeData THEN LinkedList[PreviousPointer].Pointer ← LinkedList[CurrentPointer].Pointer LinkedList[CurrentPointer].Pointer ← NULL RETURN TRUE ENDIF ENDIF ENDIF ENDIF ENDFUNCTION
Mark scheme, page 14
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 14 of 15 Question Answer Marks 7 Label Op Code Operand Comment LDR #0 LDM #0 // initialise LENGTH to 0 STO LENGTH LOOP: IN CMP EXCLAMATIO N // is character = EXCLAMATION ('!')? [1] JPE OUTPUT // if true, jump to OUTPUT [1] STX USERNAME // store character in USERNAME + contents of IX [1] INC IX // increment Index Register LDD LENGTH // increment LENGTH [1] INC ACC STO LENGTH CMP MAX // is LENGTH = MAX ? [1] JPN LOOP // if FALSE, jump to LOOP [1] OUTPUT: LDR #0 LDM #0 // initialise COUNT to 0 [1] STO COUNT LDX USERNAME OUT INC IX LDD COUNT // increment COUNT INC ACC STO COUNT CMP LENGTH // is COUNT = LENGTH ? [1] JPN OUTPUT END // end program LENGTH: EXCLAMATION: B0010001 MAX: 8 COUNT: USERNAME: 8
Mark scheme, page 15
9608/43 Cambridge International AS & A Level – Mark Scheme PUBLISHED October/November 2020 © UCLES 2020 Page 15 of 15 Question Answer Marks 8(a) • 8 … • …it calls itself 2 8(b) 1 mark each: • Final return value = 5 • Output column • Return value column • Value 1 and Value 2 columns • Temp column Value1 Value2 Temp EndValue OUTPUT Return Value 1 1 1 12 1 5 2 2 4 3 2 2 3 3 5 3 3 5 2 8 5 5 8 1 13 8 13 0 5 8(c) To output/find a value that is the addition of the two previous values // (output) Fibonacci sequence 1
What you needed in this session
Cambridge’s own grade thresholds for 2020 Oct/Nov, Paper 4 · Variant 3. A higher threshold means an easier paper — the bar moves with how the cohort did.