← Years 5–6 Creating Digital Solutions

Condition

A question about the situation that can only be answered true or false (yes or no), like 'Is it raining?' or 'Is the score above 10?'. It helps an algorithm decide what to do.

Understanding Condition in Years 5–6 Creating Digital Solutions

What it does: The question can only be answered yes (true) or no (false), so it works as a condition. If the score is 12 the answer is true. If the score is 8 the answer is false. There is no other answer. 'Is the score above 10?' can only be answered yes or no. 'What is your score?' needs a number as the answer. 7 is not above 10, so the answer is no. That means the condition is false. If it is sunny, it is not raining. So the condition is false. 'Pick a number' is an instruction, not a question with a yes or no answer. 'Is the door open?' is a condition.

Common mistakes: A condition must be a question that is true or false. score + target gives a number, not true or false. It should compare them, like score > target. The answer to 'Is it raining?' can only be TRUE or FALSE, so it can't be checked against 7. The condition should be raining = TRUE.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 11–20) and word search (Modules 1–20).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which one is a condition?
Is it raining?Tell me about the weather
Matches
IF what is your favourite colour THEN
↓
This is not a condition. It cannot be answered with true or false. Fix it with a yes/no question like 'Is your favourite colour blue?'
Applying
Meanings
Term
condition
Meaning
A question about the situation that can only be answered true or false (yes or no), like 'Is it raining?' or 'Is the score above 10?'. It helps an algorithm decide what to do.
Practice
condition: Is it raining?
Testing
Gaps
raining = true THEN
Check Answer
Spots
2SET target ← 10
3IF score + target THEN

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Woodpecker' badge — Tap Tap Tap, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Which one is a condition?
A. Is it raining? ✓
B. Tell me about the weather
A condition is a question that can only be answered true or false (yes or no). 'Is it raining?' is a yes/no question.
2. Which one is a condition?
A. What is your score?
B. Is the score above 10? ✓
'Is the score above 10?' can only be answered yes or no. 'What is your score?' needs a number as the answer.
3. The score is 7. Is the condition 'Is the score above 10?' true or false?
A. False ✓
B. True
7 is not above 10, so the answer is no. That means the condition is false.
4. The score is 15. Is the condition 'Is the score above 10?' true or false?
A. False
B. True ✓
15 is above 10, so the answer is yes. That means the condition is true.
5. What are the only two answers a condition can have?
A. True or false ✓
B. Any number or word
A condition is always answered with true or false (yes or no). Nothing else.

Match the Pairs

IF it is raining THEN → 'it is raining' is the condition: a yes/no question that is either true or false
score > 10 → A condition with numbers that is true when the score is above 10, and false if it is not
A condition is a yes/no question about the situation → Is the door open?
A condition can only ever have the answer true or false → Is the score above 10? true
IF what is your favourite colour THEN → This is not a condition. It cannot be answered with true or false. Fix it with a yes/no question like 'Is your favourite colour blue?'
IF score THEN → A number on its own is not a question. Fix it by asking a true/false question such as 'score > 10'.

Key Term

condition
A question about the situation that can only be answered true or false (yes or no), like 'Is it raining?' or 'Is the score above 10?'. It helps an algorithm decide what to do.

Fill in the Blanks

1. IF raining = true THEN SAY "Take an umbrella"
Hint: Type the keyword that starts a decision based on a condition
2. IF score > 10 THEN SAY "You win!"
Hint: Type the symbol that asks if the score is above 10
3. IF raining = true THEN SAY "Take an umbrella"
Hint: Type the value that means the answer to the condition is yes
4. score ← 4 score > 10 is false
Hint: Type the value this condition gives when the score is only 4
5. score ← 12 IF score > 10 THEN SAY "Great job!"
Hint: Type the name of the variable that the condition checks

Spot the Error

Question 1
A SET score ← 12
B SET target ← 10
C IF score + target THEN
D SAY 'You win!'
E END IF
Line C — A condition must be a question that is true or false. score + target gives a number, not true or false. It should compare them, like score > target.
Question 2
A ASK 'Is it raining?'
B SET raining ← answer
C IF raining = 7 THEN
D SAY 'Take an umbrella'
E END IF
Line C — The answer to 'Is it raining?' can only be TRUE or FALSE, so it can't be checked against 7. The condition should be raining = TRUE.
Question 3
A SET score ← 12
B SAY 'Checking the score'
C SET limit ← 10
D IF score is a big number THEN
E SAY 'High score!'
F END IF
Line D — 'A big number' is vague, so the computer can't answer it with true or false. A condition needs a clear test, like score > limit.
Question 4
A SET light ← 'green'
B SET walk ← FALSE
C IF light ← 'green' THEN
D SET walk ← TRUE
E END IF
Line C — ← stores a value; it does not ask a question. The condition should use = to ask 'Is the light green?', so IF light = 'green' THEN.
Question 5
A SET age ← 11
B IF age <= 10 THEN
C SAY 'You are 10 or older'
D END IF
Line B — The message is for people aged 10 or older. The condition 'Is age 10 or less?' asks the wrong question. It should be age >= 10.

Student with a class code? Join your class →