Pseudocode is a human-readable notation for describing algorithms. It uses structured language (keywords, indentation) without being tied to any specific programming language. The goal is clarity, not executability.
KEY TAKEAWAY: Pseudocode is the primary language for expressing algorithms in VCE Algorithmics. It bridges natural language and code — precise enough to implement, readable enough for humans.
Variables store data values. Assignment uses the ← arrow.
x ← 5
name ← "Alice"
result ← x * 2 + 1
Declaration is implicit — variables are created when first assigned.
Instructions execute in order from top to bottom.
a ← 3
b ← 4
c ← a + b // c = 7
Branch based on a Boolean condition.
if condition then
// executed if condition is true
else if other_condition then
// executed if other_condition is true
else
// executed if no condition is true
end if
Example:
if score >= 50 then
result ← "pass"
else
result ← "fail"
end if
for i ← start to end do
// body executed for each value of i
end for
for each item in collection do
// body
end for
while condition do
// body
end while
Example — sum of first n integers:
sum ← 0
for i ← 1 to n do
sum ← sum + i
end for
return sum
Functions encapsulate reusable logic with inputs (parameters) and an output (return value).
FUNCTION functionName(param1, param2)
// body
return result
Example:
FUNCTION isEven(n)
if n mod 2 = 0 then
return true
else
return false
end if
Calling a function:
result ← isEven(6) // result = true
| Operator | Meaning | Example |
|---|---|---|
AND |
Both conditions true | x > 0 AND x < 10 |
OR |
At least one true | x = 0 OR x = 1 |
NOT |
Negation | NOT isEmpty(S) |
← for assignment (not =)= for equality comparison//Stack.push(S, x) or push(S, x)EXAM TIP: When writing pseudocode in exams, use consistent notation. Marks are awarded for logical correctness and clarity, not for syntax — but you must be unambiguous.
ALGORITHM LinearSearch(A, target)
for i ← 0 to length(A) - 1 do
if A[i] = target then
return i
end if
end for
return -1