Computer Science For First Examination In 2021 9618 · 11

11.3 Structured programming

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

Reset
2024 May-June · Paper 43 · Q2(d)(i)

Structured programming · 6 marks · official answer ready

2 Take a screenshot of the output(s). Save your program. Copy and paste the screenshot into part 1(c)(ii) in the evidence document. [2] (d) The procedure BubbleSort() uses a bubbl…

2024 May-June · Paper 43 · Q4(e)(iii)

Structured programming · 31 marks

(iii) Write program code to amend the main program to call ChooseTrees(). Test your program with the following tree requirements: • a maximum height of 400 cm • a maximum width of…

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

Structured programming · 7 marks · official answer ready

(a) A new procedure MyOutput() will take a string and a Boolean parameter. MyOutput() may be called repeatedly and will use concatenation to build a string using a global variable…

2023 October-November · Paper 23 · Q8(b)(ii)

Structured programming · 58 marks

(ii) The design is modified and Sub-9() is changed to a procedure. The procedure will be called with a single parameter of type MyType. Write the pseudocode header for procedure S…

2023 October-November · Paper 41 · Q1(a)(ii)

Structured programming · 2 marks · official answer ready

(ii) Write program code to call the function IterativeVowels() with the parameter "house" from the main program. Output the return value. Save your program. Copy and paste the pro…

2023 October-November · Paper 41 · Q1(b)(ii)

Structured programming · 1 mark · official answer ready

(ii) Write program code to call the function RecursiveVowels() with the parameter "imagine" from the main program. Output the return value. Save your program. Copy and paste the p…

2023 May-June · Paper 22 · Q11(a)

Structured programming · 3 marks

(a) Explain why the program gives unexpected results. .............................................................................................................................…

2023 May-June · Paper 22 · Q11(c)

Structured programming · 3 marks

(c) Describe how a typical Integrated Development Environment (IDE) could be used to identify this error. .........................................................................…

2023 May-June · Paper 22 · Q11(d)

Structured programming · 7 marks

11 Num 1.0 ... 40 REPEAT 41 CALL DisplaySqrt(Num) 42 Num Num + 1.0 43 UNTIL Num > 10 ... 50 PROCEDURE DisplaySqrt(BYREF ThisNum : REAL) 51 OUTPUT ThisNum 52 ThisNum SQRT(ThisNum) …

2023 May-June · Paper 23 · Q2(b)(i)

Structured programming · 2 marks · official answer ready

(i) Two of the parameter values can be checked without reference to the third parameter. Describe these two checks. Check 1 .......................................................…

2023 May-June · Paper 23 · Q2(b)(ii)

Structured programming · 2 marks · official answer ready

(ii) Several values of the parameter representing the day can only be checked completely by referring to the value of one other parameter. Describe this check. ...................…

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

Structured programming · 7 marks · official answer ready

(a) Write pseudocode for procedure Select(). Parameter validation is not required. ................................................................................................…

2023 May-June · Paper 41 · Q1(b)(i)

Structured programming · 3 marks · official answer ready

(i) The procedure PrintArray() takes an integer array as a parameter and outputs the contents of the array in the order they are stored. The items are printed on the same line, fo…

2023 May-June · Paper 41 · Q1(b)(ii)

Structured programming · 1 mark · official answer ready

(ii) Amend the main program to output the contents of DataArray using the procedure PrintArray() Save your program. Copy and paste the program code into part 1(b)(ii) in the evide…

2023 May-June · Paper 41 · Q3(b)(ii)

Structured programming · 3 marks · official answer ready

(ii) Study the pseudocode function PopAnimal(): FUNCTION PopAnimal() RETURNS STRING DECLARE ReturnData : STRING IF AnimalTopPointer = 0 THEN RETURN "" ELSE ReturnData Animal[Anima…

2023 May-June · Paper 43 · Q1(b)(i)

Structured programming · 3 marks · official answer ready

(i) The procedure PrintArray() takes an integer array as a parameter and outputs the contents of the array in the order they are stored. The items are printed on the same line, fo…

2023 May-June · Paper 43 · Q1(b)(ii)

Structured programming · 1 mark · official answer ready

(ii) Amend the main program to output the contents of DataArray using the procedure PrintArray() Save your program. Copy and paste the program code into part 1(b)(ii) in the evide…

2023 May-June · Paper 43 · Q3(b)(ii)

Structured programming · 3 marks · official answer ready

(ii) Study the pseudocode function PopAnimal(): FUNCTION PopAnimal() RETURNS STRING DECLARE ReturnData : STRING IF AnimalTopPointer = 0 THEN RETURN "" ELSE ReturnData Animal[Anima…

2021 October-November · Paper 21 · Q5(c)

Structured programming · 11 marks · official answer ready

5 [4] (c) A function LogEvents() will: • take a Student ID as a parameter • for each element in the array that matches the Student ID parameter: ◦ add the value of the array eleme…