Skip to content
MathAnvil

Algorithms & Variables Worksheets

Free printable algorithms & variables worksheets with step-by-step answer keys. Every worksheet is uniquely generated so students never see the same problems twice. Topics covered range from single variable update: x = x op value at the easy level through to while-loop with termination condition at the advanced level.

LK20.10

Difficulty Levels

Beginner

Concepts
Single variable update: x = x op value
Number Range
operands: 1–20
Steps
2 steps
Example
x = 7; x = x + 3. What is x?

Easy

Concepts
If-condition with one variable update
Number Range
x: 6–20, threshold varies
Steps
2 steps
Example
x = 10; if x > 5: x = x βˆ’ 3

Medium

Concepts
Loop with fixed iterations (for-loop trace)
Number Range
4–6 iterations, ops: Γ—2, Γ—3, +3
Steps
2 steps
Example
x = 1; repeat 5 times: x = x Γ— 2

Hard

Concepts
While-loop with termination condition
Number Range
start: 1–200, various halving/subtracting ops
Steps
2 steps
Example
x = 100; while x > 10: x = x // 2

Grade Availability

Algorithms & Variables worksheets are available for Grade 10. Problems are automatically adjusted to match grade-level expectations in number range, complexity, and notation.

Try a Sample Problem

Try it right now

Learn the theory β†’ Read our algorithms & variables guide with worked examples.

Practice online β†’ Interactive algorithms & variables problems with instant feedback.