Computer science · Grades 9–10
Algorithms & logic · Formula sheet
Rules, conditions and small examples in one printable reference.
Remember this
Zero-based array indexing
An index of zero refers to the first position, not the second.
first item → index 0
index 3 → 98
Nested loops
This product applies when the inner count is constant for each outer iteration.
total executions = outer iterations × inner iterations
22 × 14 = 308
Trace a loop with a step
The upper limit is inclusive in the pseudocode here.
count = floor((last − first)/step) + 1
(144 − 14)/5 + 1 = 27
Learning preview · teacher review required. Grade bands are approximate, not official curriculum alignment.