Chapter B2 · 12 available objectives
Programming
Data structures, algorithms, recursion, and file processing.
Construct and trace programs using a range of global and local variables
Construct and trace programs using a range of global and local variables
1 minB2.1.2Construct programs that can extract or manipulate strings
Find the index when the substring first appears print(message.find("e")) 1 print(message.find("Hel")) 0
1 minB2.1.3Describe how programs use common exception handling techniques
Exception handling prevents programs from crashing when errors occur by catching them and responding gracefully.
2 minB2.2.1Compare static and dynamic data structures
Have a fixed size determined at compile time — size cannot change during execution.
1 minB2.2.2Construct programs that apply arrays and lists
A 1D list is a sequence of elements stored in a single row.
2 minB2.2.3Explain the concept of a stack as a "last in, first out" (LIFO) data structure
A stack is a linear data structure where elements are added and removed from the same end , called the top . The last element pushed onto the stack is the…
3 minB2.2.4Explain the concept of a queue as a "first in, first out" (FIFO) data structure
A queue is a linear data structure where elements are added at the rear (back) and removed from the front . The first element added is the first one to be…
2 minB2.4.1Describe the efficiency of specific algorithms by calculating their Big O notation to analyse their scalability
Big O notation describes the upper bound of an algorithm's growth rate — how time (or space) increases as input size ($n$) grows.
2 minB2.4.2Construct and trace algorithms to implement a linear search and a binary search for data retrieval
How it works: Sequentially checks each element from the start until the target is found or the list ends. Works on any list — sorted or unsorted.
2 minB2.4.3Construct and trace algorithms to implement bubble sort and selection sort, evaluating their time and space complexities
How it works: Repeatedly steps through the list, compares adjacent pairs, and swaps them if they are in the wrong order. After each full pass, the largest…
3 minB2.4.4Explain the fundamental concept of recursion and its applications in programming.
Recursion is a programming technique where a function calls itself with updated arguments to solve a problem by breaking it into smaller, self similar sub…
3 minB2.5.1Construct code to perform file-processing operations
A file is a named collection of data stored on secondary storage (e.g., hard drive, SSD). Files allow data to persist after a program ends — unlike…
4 min