Computer Science 0478 · 7

Algorithm design and problem-solving

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

2025 May-June · Paper 21 · Q6(a)

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

(a) Identify the line numbers of the four errors in the pseudocode and suggest a correction for each error. Error 1 line number ............................ Correction ...........…

2025 May-June · Paper 21 · Q6(b)

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

(b) Identify one method to make the algorithm maintainable. Give an example. ......................................................................................................…

2025 May-June · Paper 21 · Q10(a)

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

(a) Complete the trace table for the algorithm, using the input data: 21, 46, 63, 91, 12 Score Grade OUTPUT [3]

2025 May-June · Paper 21 · Q10(b)

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

(b) Explain how the flowchart can be changed to produce the correct output. .......................................................................................................…

2025 May-June · Paper 22 · Q3

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

3 A range check is used to validate that the input temperature is an integer between –100 and 0, inclusive. Suggest suitable normal, abnormal, extreme and boundary test data to te…

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

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

4 (a) State one reason for using a verification check when inputting data. ........................................................................................................…

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

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

(b) Write the pseudocode for an algorithm to perform a double entry verification check, using the following criteria: • Input 10 numbers and store them in the array Numbers[] • In…

2025 May-June · Paper 22 · Q5(a)

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

(a) Identify the line numbers of five errors in the pseudocode and suggest a correction for each error. Error 1 line number .................................. Correction .........…

2025 May-June · Paper 22 · Q6(a)

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

(a) Complete the trace table for the algorithm, using the input data: 2, RACECAR, TREAT Number Index Word Continue V1 V2 L1 L2 OUTPUT [6]

2025 May-June · Paper 22 · Q7(a)

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

(a) Complete the flowchart. START Count 0 Total 0 No Yes No Yes STOP [6] 9 , ,

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

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

(b) Explain how you would alter the flowchart in 7(a) so that it will individually store each accepted value as it is entered and then output all the numbers, one after the other,…

2025 May-June · Paper 23 · Q1(a)

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

(a) Complete this flowchart. START PassCount 0 RejectCount 0 Yes No No Yes STOP [6] 3 , ,

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

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

(b) Explain how you would alter the flowchart in 1(a) so that it calculates and outputs the average weight of only the biscuits that passed the weight check. You may include progr…

2025 May-June · Paper 23 · Q3(a)

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

(a) Identify the line numbers of four errors in the pseudocode and suggest a correction for each error. Error 1 line number ............................... Correction ............…

2025 May-June · Paper 23 · Q4(a)(i)

Algorithm design and problem-solving · 1 mark

(i) State the type of validation check to test if the input meets this requirement. ...............................................................................................…

2025 May-June · Paper 23 · Q4(a)(ii)

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

(ii) Suggest suitable abnormal and extreme test data for an integer between 10 and 95 inclusive, and give a reason for each of your choices. Abnormal test data ...................…

2025 May-June · Paper 23 · Q4(b)(i)

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

(i) State the type of validation check to test that the password meets this requirement. ..........................................................................................…

2025 May-June · Paper 23 · Q4(b)(ii)

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

(ii) Write the pseudocode to allow a new password to be entered and to ensure that it contains at least 12 characters. The password is re-input until it meets this requirement. Us…

2025 May-June · Paper 23 · Q6(a)

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

(a) Complete the trace table for the algorithm, using input data: COMPUTER Store[] Word Index Letter [1] [2] [3] [4] [5] [6] [7] [8] OUTPUT [5]

2025 February-March · Paper 22 · Q1

Algorithm design and problem-solving · 1 mark

1 Tick (✓) one box to complete this sentence. A standard method of solution used to find a piece of data in an array is a A bubble sort. B counting routine. C linear search. D sel…