Programming Construct Identification 1 (1 mark)
What programming construct is used in the code snippet shown below? for i 0 to 5 print(i) next i
Programming Construct Identification 1 (1 mark) Read More »
What programming construct is used in the code snippet shown below? for i 0 to 5 print(i) next i
Programming Construct Identification 1 (1 mark) Read More »
What programming construct is used in the code snippet shown below? if temperature > 30: print(“It’s a hot day.”) else: print(“It’s not a hot day.”)
Programming Construct Identification 2 (1 mark) Read More »
Consider a scenario where a program keeps track of the score of a game and the maximum possible score. Define what you would use as a variable and what as a constant, and explain your reasoning. a) What would you define as a variable? b) What would you define as a constant?
Variables and Constants. (2 marks) Read More »
Given the expression: 9 * (3 + x) > 50 a) What is the role of the parentheses in this expression? b) Explain what this expression represents. c) List the operators used in this expression.
Operators and Expressions. (3 marks) Read More »
Describe the process of the Bubble Sort algorithm when applied to a set of numbers.
Describe the process of the Bubble Sort. (2 marks) Read More »
Explain how the Merge Sort algorithm sorts a dataset.
Process of the Merge Sort Algorithm. (3 marks) Read More »
Describe the Insertion Sort process using a simple array of integers [8, 3, 5, 4] as an example. Explain how elements are sorted step-by-step.
Basic Explanation of Insertion Sort. (3 marks) Read More »
Review the pseudocode below and explain the type of search algorithm used: for i = 0 to (list.length) – 1 if list[i] == target then print(“Found at position”, i) break endif next i print(“Not found”)
Identify the Search Algorithm (2 marks) Read More »
A list of student names sorted alphabetically: Alice, Bob, Charlie, David, Emma. Write the steps you would take to find the name “Emma” using a binary search.
Applying a Binary Search Algorithm. (3 marks) Read More »
Explain how algorithmic thinking can be applied to improve the efficiency of a school’s registration system for new students. Consider aspects such as data collection, processing, and output.
Algorithmic Thinking. (4 marks) Read More »