Computer Science 0478 · 7

Algorithm design and problem-solving

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

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 …

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

2022 May-June · Paper 23 · Q1(b)

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

(b) Describe how you could test if the validation of the input to choose a meeting room works (Task 2). ...........................................................................…

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

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

(d) Write an algorithm to show how your program completes the following parts of Task 2: • output the booking details and cost of the booking • take confirmation from the client •…

2022 May-June · Paper 23 · Q2

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

2 Tick (3) one or more boxes in each row to match the type(s) of test data to each description. Types of test data Description Erroneous / Boundary Extreme Normal Abnormal test da…

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

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

(a) Complete the trace table for the algorithm using this input data: 5, 9, 5, 8, 10, 7 Store In Logic Test Number Count Limit Out OUTPUT [Count] [7] 9

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

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

(c) This algorithm only works for numbers that are 3 or greater. Describe how you could change this algorithm to make sure that only numbers that are 3 or greater are entered. Any…

2022 May-June · Paper 23 · Q5

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

5 The flowchart shows an algorithm that should: • allow 100 numbers to be entered into the variable Number • total the numbers as they are entered • output the total and average o…

2022 February-March · Paper 12 · Q2(c)(iv)

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

(iv) Identify and describe one other method of error detection used during the transmission of data. Method .......................................................................…

2022 February-March · Paper 22 · Q1(c)

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

(c) Write an algorithm for Task 2, using pseudocode, programming statements or a flowchart. .......................................................................................…

2022 February-March · Paper 22 · Q2(a)

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

(a) Complete the pseudocode algorithm: 01 Count7to12 0 ← 02 Count12to18 0 ← 03 CountOver18 0 ← 04 FOR Student ← 1 TO ............................................ 05 OUTPUT "Please…

2022 February-March · Paper 22 · Q4(a)

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

(a) Complete the trace table for the given algorithm using this input data: 7, 6, 5, 4, –1, 12, 34 Number C D OUTPUT [6]

2022 February-March · Paper 22 · Q4(c)(ii)

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

(ii) Explain how to change the flowchart to prevent this problem occurring. .......................................................................................................…