Sections › Coding › Logic and if-then rules
Logic and if-then rules
Computers make decisions with conditions: if this, then that. Children use the same logic every day.
What it looks like at each age
Ages 4–7
Sorting games with one rule.
Ages 8–11
Two-part rules with AND and OR, if-then squares in games.
Ages 12–15
Flowcharts and designing rule systems.
Three things to try this week
- Play 'If I clap, you jump' games.
- Draw a flowchart for choosing what to wear.
- Spot rules in daily life: 'If it rains, we take an umbrella.'
Activities for this topic

CodingAges 4–720 minutesFamily plan
🔒 If-Then Card Sorting Game
Sort picture cards with simple rules like 'if it's red, put it in the box'. The first step to how computers make decisions.
CodingAges 8–1160 minutesFamily plan
🔒 Design a Paper Board Game
Design a board game with if-then squares, variables like lives and coins, and rules tight enough that nobody can argue.Words to know
- Condition
- The 'if' part of a rule: something that's checked to see if it's true.
- Variable (in coding)
- A named box that holds a value which can change.