Problem Solving and Programming Fundamentals
What this domain tests
Problem Solving and Programming Fundamentals tests algorithm design, flowcharts, pseudocode, variables, data types, control structures, functions and testing. The exam rewards precise sequencing and correct dry runs.
Core rules
- An algorithm is a finite, unambiguous sequence of steps; it must terminate and produce output for valid input.
- Flowchart symbols: oval = start/end; parallelogram = input/output; rectangle = process; diamond = decision; arrow = flow.
- Three control structures: sequence, selection (if/else), iteration (while/for). A loop needs initialisation, condition and update.
- A variable is a named storage location; assignment stores a value, equality compares. Data types constrain operations.
- Test cases should include normal, boundary and invalid input; desk-checking traces variable values line by line.
Worked example
Algorithm to find the largest of three numbers a, b, c:
- max ← a
- If b > max then max ← b
- If c > max then max ← c
- Output max Dry run with a=7, b=12, c=9: max=7; 12>7 so max=12; 9>12 is false; output 12. The reasoning is that max always holds the largest value seen so far; each comparison updates it only when a larger value appears.
Traps
Do not use = for comparison in pseudocode when you mean equality. Check loop boundaries: "repeat n times" differs from "while i < n" if i starts at 1. A flowchart decision has two outgoing arrows. Missing update causes an infinite loop. Do not forget to output the result.