Computer Science 2210 · 7

Algorithm design and problem-solving

175 questions. Open a question to solve it and check the official answer.

2022 May-June · Paper 22 · Q2(a)

Algorithm design and problem-solving · 3 marks · official answer ready

(a) Identify the three errors in the pseudocode and suggest a correction to remove each error. Error 1 ............................................................................…

2022 May-June · Paper 22 · Q2(b)

Algorithm design and problem-solving · 4 marks · official answer ready

(b) The algorithm includes two types of check on the data input. Identify and describe each type of check. Type of check 1 ........................................................…

2022 May-June · Paper 22 · Q2(c)

Algorithm design and problem-solving · 4 marks · official answer ready

(c) Give two sets of test data for this algorithm and a reason for choosing each set. Each set of test data and its reason must be different. Set 1 ...............................…

2022 May-June · Paper 22 · Q4(a)

Algorithm design and problem-solving · 7 marks · official answer ready

(a) Complete the trace table for the algorithm using this input data: 75, 78, 84, 87, 91, 80, 75, 70, 65, 62, –1, 20 Counter Hot Cold Serve Temp Error OUTPUT [7]

2022 May-June · Paper 22 · Q4(c)

Algorithm design and problem-solving · 1 mark · official answer ready

(c) Identify the process in the algorithm that is not required. ...................................................................................................................…

2021 October-November · Paper 22 · Q1(c)

Algorithm design and problem-solving · 6 marks · official answer ready

(c) Write an algorithm to show how your program carries out Task 3, using either pseudocode, programming statements or a flowchart. Assume Tasks 1 and 2 have already been complete…

2021 October-November · Paper 22 · Q2

Algorithm design and problem-solving · 3 marks · official answer ready

2 Tick (3) one box in each row to identify if the statement is about validation, verification or neither. Validation Verification Neither Statement (3) (3) (3) a check where data …

2021 October-November · Paper 22 · Q3

Algorithm design and problem-solving · 6 marks · official answer ready

3 A program checks that the data entered is between 1 and 100 inclusive. Identify one piece of normal, extreme and erroneous test data for this program, and give a reason for each…

2021 October-November · Paper 22 · Q22(b)

Algorithm design and problem-solving · 16 marks

(b) The algorithm needs changing to allow only the numbers 1, 2, 3, or 4 to be entered for the input variable Operator. Write the pseudocode to perform this task and state where i…

2021 May-June · Paper 11 · Q3(b)

Algorithm design and problem-solving · 3 marks · official answer ready

(b) Identify three other methods that could be used to keep the data secure. Method 1 .............................................................................................…

2021 May-June · Paper 21 · Q1(c)

Algorithm design and problem-solving · 5 marks · official answer ready

(c) Write an algorithm using pseudocode, programming statements or a flowchart to show how your program completes these parts of Task 2: • Allows students to enter their unique vo…

2021 May-June · Paper 21 · Q2

Algorithm design and problem-solving · 3 marks · official answer ready

2 Tick (ü) one box in each row to identify if the statement is about validation, verification or both. Validation Verification Both Statement (ü) (ü) (ü) Entering the data twice t…

2021 May-June · Paper 21 · Q5(a)

Algorithm design and problem-solving · 4 marks · official answer ready

(a) Complete the trace table for the input data: Value Diff1 Diff2 OUTPUT [4]

2021 May-June · Paper 22 · Q1(b)

Algorithm design and problem-solving · 6 marks · official answer ready

(b) Describe two validation checks that could be used when inputting the number of tickets to buy for Task 2. For each validation check give one example of normal data and one exa…

2021 May-June · Paper 22 · Q1(c)

Algorithm design and problem-solving · 6 marks · official answer ready

(c) Write an algorithm for the part of Task 2 that inputs the tickets required, calculates the total price for the ticket(s) purchased by a passenger including a group discount (i…

2021 May-June · Paper 22 · Q3(a)

Algorithm design and problem-solving · 3 marks · official answer ready

3 (a) Draw the most appropriate flowchart symbol for each pseudocode statement. Pseudocode statement Flowchart symbol IF Number = 20 PRINT Number Number ← Number + 1 [3]

2021 May-June · Paper 22 · Q4(a)

Algorithm design and problem-solving · 3 marks · official answer ready

(a) Complete the trace table for the algorithm using this input data: Secret, Secret, VerySecret, VerySecret, Pa55word, Pa55word, 999, 888 Password PasswordRepeat OUTPUT [3] 11

2021 May-June · Paper 22 · Q4(b)

Algorithm design and problem-solving · 4 marks · official answer ready

(b) Explain how the algorithm could be extended to allow three attempts at inputting the matching password. Any pseudocode statements used in your answer must be fully explained. …

2020 October-November · Paper 13 · Q6

Algorithm design and problem-solving · 5 marks · official answer ready

6 Elsa writes a paragraph in an examination about encryption. There are several terms missing from the paragraph. Complete the paragraph using the list of given terms. Not all ter…

2020 October-November · Paper 22 · Q1(c)

Algorithm design and problem-solving · 6 marks · official answer ready

(c) Write an algorithm to show how you completed Task 1, using either pseudocode, programming statements or a flowchart. It is not necessary to show initialisation or setting up o…