Computer Science 2210 · 7

Algorithm design and problem-solving

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

2023 October-November · Paper 22 · Q2(b)

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

(b) Give one example of normal test data and one example of abnormal test data you should use to make sure the check in part (a) is working properly. State a reason for each of yo…

2023 October-November · Paper 22 · Q2(c)

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

(c) Describe how a length check could be used with the date entered. ..............................................................................................................…

2023 October-November · Paper 22 · Q4(a)

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

(a) Identify the four errors in the pseudocode and suggest corrections. Error 1 ...................................................................................................…

2023 October-November · Paper 22 · Q6(a)

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

(a) Complete the trace table for the input data: 25, 35, 3, 0, 57, 20, 25, 18, 0, –1, 307, 40, 0 Value Average Total Count OUTPUT [5]

2023 October-November · Paper 23 · Q1

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

1 Tick (3) one box to show which term is an example of a verification check. A Double entry check B Format check C Length check D Presence check [1]

2023 October-November · Paper 23 · Q4(b)

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

(b) Complete this pseudocode to perform your two validation checks, using your answers given in (a): OUTPUT "Please enter the number of seats you want to book " INPUT Seats ......…

2023 October-November · Paper 23 · Q4(c)

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

(c) Give one item of test data to use when testing this program. State the reason for your choice of test data. Test data .........................................................…

2023 October-November · Paper 23 · Q5(a)

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

(a) Identify the three errors in the pseudocode and suggest corrections. Error 1 ..................................................................................................…

2023 October-November · Paper 23 · Q5(b)

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

(b) Complete this flowchart for the corrected algorithm: START STOP [6] 8

2023 October-November · Paper 23 · Q8(a)

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

(a) Complete the trace table using this data: Y, Y, Y, N, Y, Y, Y, Y, N, Y, Y, Y, Y Accept Reject PartOK Error OUTPUT [5]

2023 May-June · Paper 21 · Q1(a)

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

1 (a) Four descriptions of stages in the program development life cycle are shown. Draw one line to link each description to its most appropriate program development life cycle st…

2023 May-June · Paper 21 · Q3(b)

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

(b) A validation check is used to make sure that any value that is input is an integer between 30 and 200 inclusive. Give one example of each type of test data to check that the v…

2023 May-June · Paper 21 · 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 ...................................................................................…

2023 May-June · Paper 21 · Q7

Algorithm design and problem-solving · 0 marks

7 The flowchart represents an algorithm. START Pointer 1 INPUT Letter IS No Word[Pointer, 1] Pointer Pointer + 1 = Letter ? Yes OUTPUT "Letter ", Letter, " is represented by ", Wo…

2023 May-June · Paper 21 · Q7(a)

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

7 The flowchart represents an algorithm. START Pointer 1 INPUT Letter IS No Word[Pointer, 1] Pointer Pointer + 1 = Letter ? Yes OUTPUT "Letter ", Letter, " is represented by ", Wo…

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

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

7 The flowchart represents an algorithm. START Pointer 1 INPUT Letter IS No Word[Pointer, 1] Pointer Pointer + 1 = Letter ? Yes OUTPUT "Letter ", Letter, " is represented by ", Wo…

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

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

7 The flowchart represents an algorithm. START Pointer 1 INPUT Letter IS No Word[Pointer, 1] Pointer Pointer + 1 = Letter ? Yes OUTPUT "Letter ", Letter, " is represented by ", Wo…

2023 May-June · Paper 21 · Q13(a)

Algorithm design and problem-solving · 4 marks

(a) Complete the trace table for the algorithm by using the input data: F, Y, D, N Pointer Letter Choice OUTPUT [4] 8

2023 May-June · Paper 21 · Q13(b)

Algorithm design and problem-solving · 1 mark

(b) Identify the type of algorithm used. ..........................................................................................................................................…

2023 May-June · Paper 22 · Q1

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

1 Tick (✓) one box to identify the first stage of the program development life cycle. A Analysis B Coding C Design D Testing [1]