Computer Science 2210 · 7

Algorithm design and problem-solving

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

2019 May-June · Paper 22 · Q3

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

3 This flowchart inputs the marks gained in an examination. An input of –1 ends the routine. START Total 0 Count 0 Distinction 0 INPUT Mark Is Mark = –1 ? Yes Total Total + Mark C…

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

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

(c) Write an algorithm for Task 2, using either pseudocode, programming statements or a flowchart. You should assume that Task 1 has already been completed. ......................…

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

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

(b) Give two sets of test data to use with your algorithm in part (a) and explain why you chose each set. Test data set 1 .........................................................…

2018 October-November · Paper 22 · Q5(b)

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

(b) Identify a problem with the algorithm that the flowchart represents. ..........................................................................................................…

2018 October-November · Paper 23 · Q1(b)

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

(b) Write an algorithm to show how your program finds and displays the weeks available for each log cabin and its capacity (part of Task 2), using either pseudocode, programming s…

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

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

(c) Describe how you could validate the input to identify a log cabin in Task 2. State one valid and one invalid item of data to test your validation method. Validation method ...…

2018 October-November · Paper 23 · Q9(b)

Algorithm design and problem-solving · 12 marks

(b) State the purpose of this program. ............................................................................................................................................…

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

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

(c) Write an algorithm for Task 2, using either pseudocode, programming statements or a flowchart. Assume that Task 1 has been completed. .........................................…

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

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

2 (a) Draw a flowchart for an algorithm to input numbers. Reject any numbers that are negative and count how many numbers are positive. When the number zero is input, the process …

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

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

(a) Complete the trace table for the input data: * 5, 7, +, 6, 2, –, 4, 3, , 7, 8, ?, 0, 0, / Number1 Number2 Sign Answer OUTPUT [3]

2018 May-June · Paper 22 · Q3(b)

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

(b) Show how you could improve the algorithm written in pseudocode by writing an alternative type of conditional statement in pseudocode. .........................................…

2018 May-June · Paper 22 · Q5

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

5 A program checks that the weight of a basket of fruit is over 1.00 kilograms and under 1.10 kilograms. Weights are recorded to an accuracy of two decimal places and any weight n…

2017 October-November · Paper 22 · Q1(b)

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

(b) Give two different validation checks you could have used for data entry in Task 1. For each check explain why it could be used and provide a set of data for testing. Validatio…

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

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

(c) Write an algorithm to complete Task 3, using either pseudocode, programming statements or a flowchart. You may assume Task 2 has been completed. ..............................…

2017 October-November · Paper 22 · Q2

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

2 Write an algorithm using either pseudocode or a flowchart, to: • input a positive integer • use this value to set up how many other numbers are to be input • input these numbers…

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

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

5 (a) This flowchart checks a batch of 10 rice sacks for weight. Sacks should weigh 50 kilograms each. Sacks weighing over 50.5 kilograms or less than 49.5 kilograms are rejected.…

2017 October-November · Paper 22 · Q5(b)

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

(b) The size of the batch has increased to 50 sacks. It has been decided to only reject sacks that are underweight. State the changes that need to be made to the flowchart. ......…

2017 October-November · Paper 23 · Q1(b)

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

(b) Write an algorithm to complete Task 1, using either pseudocode, programming statements or a flowchart. ........................................................................…

2017 October-November · Paper 23 · Q11(a)

Algorithm design and problem-solving · 6 marks

3 (a) Explain the difference between a validation check and a verification check. .................................................................................................…

2017 October-November · Paper 23 · Q11(c)

Algorithm design and problem-solving · 46 marks

(c) Explain what is meant by the term library routine. ............................................................................................................................…