Computer Science 9608 · 9

9.2 Algorithms

47 questions in this subtopic. Open a question to solve it and check the official answer.

Reset
2021 May-June · Paper 22 · Q2(b)

Algorithms · 5 marks · official answer ready

(b) Draw a program flowchart to represent the pseudocode algorithm. Variable declarations are not required in program flowcharts. [5] 6

2021 May-June · Paper 23 · Q3(b)

Algorithms · 4 marks · official answer ready

(b) Result is a 1D array of type STRING. It contains 100 elements. Draw a program flowchart for an algorithm that will output each element in the array. [4] 6

2021 May-June · Paper 23 · Q3(c)

Algorithms · 6 marks · official answer ready

(c) The program flowchart for part of an algorithm from a mobile phone program is shown. Identifier Active is a global variable of type BOOLEAN. START Set Online to FALSE Is Onlin…

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

Algorithms · 2 marks · official answer ready

(c) A dry run of a pseudocode algorithm may help to locate logic errors. Give another type of program error and describe how it can occur. Type of error ..........................…

2019 October-November · Paper 21 · Q1(a)(ii)

Algorithms · 5 marks · official answer ready

(ii) Draw a program flowchart to represent the algorithm implemented in the pseudocode. Variable declarations are not required in program flowcharts. [5] 4

2019 October-November · Paper 22 · Q1(a)(ii)

Algorithms · 5 marks · official answer ready

(ii) Draw a program flowchart to represent the algorithm implemented in the pseudocode. Variable declarations are not required in program flowcharts. [5] 4

2019 October-November · Paper 23 · Q2(a)(ii)

Algorithms · 4 marks · official answer ready

(ii) Part of a program flowchart is shown. LOOP AlarmReset() Set Status1 to GetStatus(Sys_A) Set Status2 to GetStatus(Sys_B) Are Status1 NO and Status2 both TRUE? YES Implement th…

2019 May-June · Paper 21 · Q1(a)(i)

Algorithms · 4 marks · official answer ready

(i) Algorithms may be expressed using four basic constructs. One construct is sequence. Complete the following table for two other constructs. Construct Pseudocode example .......…

2019 May-June · Paper 21 · Q1(a)(ii)

Algorithms · 4 marks · official answer ready

(ii) Simple algorithms usually consist of input, process and output. Complete the table by placing ticks (‘3’) in the relevant boxes. Pseudocode statement Input Process Output Tem…

2019 May-June · Paper 22 · Q1(a)(i)

Algorithms · 2 marks · official answer ready

(i) Explain the term algorithm. ........................................................................................................................................... .......…

2019 May-June · Paper 22 · Q1(a)(ii)

Algorithms · 5 marks · official answer ready

(ii) Algorithms usually consist of three different types of activity. Complete the table below. The third activity type is given. Activity type Pseudocode example ................…

2019 May-June · Paper 41 · Q2(f)(ii)

Algorithms · 1 mark · official answer ready

(ii) State the name of one other sorting algorithm. ...............................................................................................................................…

2019 May-June · Paper 42 · Q4(a)(i)

Algorithms · 4 marks · official answer ready

(i) There are four errors in the algorithm. Write the line of code where an error is present and write the correction in pseudocode. Error 1 ......................................…

2019 May-June · Paper 42 · Q4(a)(ii)

Algorithms · 1 mark · official answer ready

(ii) A binary search is one algorithm that can be used to search an array. Identify another searching algorithm. ..................................................................…

2019 May-June · Paper 43 · Q2(f)(ii)

Algorithms · 1 mark · official answer ready

(ii) State the name of one other sorting algorithm. ...............................................................................................................................…

2018 October-November · Paper 21 · Q2(a)

Algorithms · 8 marks · official answer ready

(a) Write pseudocode to implement the GetDiscountRate() function. Your solution should follow the flowchart for the function as closely as possible. Variable declarations should b…

2018 October-November · Paper 22 · Q2(a)(i)

Algorithms · 7 marks · official answer ready

(i) Write pseudocode for the CalcPoints() function. Your solution should follow the flowchart as closely as possible. .............................................................…

2018 October-November · Paper 23 · Q2(a)(i)

Algorithms · 5 marks · official answer ready

(i) Write pseudocode for the CalcBonus() function. Your solution should follow the flowchart for the function as closely as possible. .............................................…

2018 October-November · Paper 42 · Q3(a)

Algorithms · 7 marks · official answer ready

(a) Write pseudocode to complete the bubble sort algorithm shown. 01 FOR Outer ..................................................................................... TO 0 STEP - 1 …

2018 October-November · Paper 42 · Q3(c)

Algorithms · 4 marks · official answer ready

(c) Use pseudocode to write an alternative version of this bubble sort algorithm that will exit the algorithm when the list is fully sorted. ......................................…