Computational thinking and problem-solving
7 questions. Open a question to solve it and check the official answer.
Algorithms · 2 marks · official answer ready
(c) Technical documentation is also produced as part of the system’s development. State two items you would expect to find in technical documentation. 1 2 [2] 5
Recursion · 17 marks · official answer ready
4 Look at this pseudocode function: FUNCTION Y(s : STRING) RETURNS STRING DECLARE x : INTEGER x LENGTH(s) IF x = 1 THEN RETURN s ELSE RETURN Y(RIGHT(s, x - 1)) + LEFT(s, 1) // RIG…
Recursion · 17 marks · official answer ready
4 Look at this pseudocode function: FUNCTION Y(s : STRING) RETURNS STRING DECLARE x : INTEGER x LENGTH(s) IF x = 1 THEN RETURN s ELSE RETURN Y(RIGHT(s, x - 1)) + LEFT(s, 1) // RIG…
Recursion · 2 marks · official answer ready
(a) A rule may be recursive. Explain what is meant by this and identify the rule above which is recursive. Rule number [2]
Recursion · 2 marks · official answer ready
(a) A rule may be recursive. Explain what is meant by this and identify the rule above which is recursive. Rule number [2]
Recursion · 1 mark
(i) A BNF rule can be recursive. State what is meant by recursive. [1]
Recursion · 1 mark · official answer ready
(ii) State the rule above which is recursive. Rule number [1]
