Computer Science 2210 · 7

Algorithm design and problem-solving

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

2023 May-June · Paper 22 · Q3

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

3 Identify three different ways that the design of a solution to a problem can be presented. 1 ....................................................................................…

2023 May-June · Paper 22 · Q4(b)(i)

Algorithm design and problem-solving · 1 mark

(i) State why this check needs to be included. ....................................................................................................................................…

2023 May-June · Paper 22 · Q7(b)

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

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

2023 May-June · Paper 22 · Q7(c)

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

(c) The algorithm does not check that each input is a single digit. Identify the place in the algorithm where this check should occur. Write pseudocode for this check. Your pseudo…

2023 May-June · Paper 22 · Q9(a)

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

(a) The array X[1:5] used in the flowchart contains this data: X[1] X[2] X[3] X[4] X[5] 10 1 5 7 11 Complete the trace table by using the data given in the array. F C X[1] X[2] X[…

2023 May-June · Paper 22 · Q9(b)

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

(b) Describe what the algorithm represented by the flowchart is doing. ............................................................................................................…

2022 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 allocates a parking space if the visitor requires accessible parking (part of Task 2), including all relevant input and output, usi…

2022 October-November · Paper 22 · Q4

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

4 Describe one type of test data that must be used to test if a program accepts valid input data. .................................................................................…

2022 October-November · Paper 22 · Q5(a)

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

(a) Identify the four errors in the pseudocode and suggest a correction for each error. Error 1 ...................................................................................…

2022 October-November · Paper 22 · Q6

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

6 This flowchart represents an algorithm to divide three-digit numbers into hundreds, tens and units. The pre-defined function DIV gives the value of the result of integer divisio…

2022 October-November · Paper 23 · Q1(c)

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

(c) Write an algorithm for the part of Task 2 that calculates the total cost of the bill. Assume that the customer details and services required have already been input. Use pseud…

2022 October-November · Paper 23 · Q2(a)

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

(a) Complete the pseudocode algorithm: 01 FOR Count 1 TO .................................................................................................... 02 Reading[Count] 0 0…

2022 October-November · Paper 23 · Q3(c)

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

(c) Identify two other validation checks that could be used when inputting this identification number. 1 ..........................................................................…

2022 October-November · Paper 23 · Q4(a)

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

(a) Complete the trace table for the algorithm using this input data: “Y”, “Y”, “Y”, “Y”, “Y”, “Y”, “N” Stock Total Sale OUTPUT [4]

2022 May-June · Paper 12 · Q6(c)

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

(c) Data can also be damaged accidentally. One example of how data can be damaged accidentally is by shutting down a computer before saving data. To prevent this from happening, a…

2022 May-June · Paper 21 · Q1(d)

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

(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 flowc…

2022 May-June · Paper 21 · Q3

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

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 ca…

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

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

(a) Complete this flowchart: START PassCount 0 FailCount 0 Count 0 Yes No Count Count + 1 No Yes END [6] 9

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

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

(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] 11

2022 May-June · Paper 22 · Q1(d)

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

(d) Write an algorithm for the part of Task 2 that inputs the tickets and extra attractions required then calculates the total cost of the booking. Assume that the booking is for …