Glossary โบ Coding โบ Condition
Condition
The 'if' part of a rule: something that's checked to see if it's true.
For kids
'If it's raining, take an umbrella.' The condition is 'it's raining'. If it's true, you take the umbrella. If not, you don't.
For grown-ups
Conditions evaluate to true or false (Boolean logic) and control which instructions run. They can be combined with AND, OR and NOT. If-then-else structures are present in every programming language.
Try it in one minute
Play 'If I touch my nose, you clap. Else, you stomp.'
Common mix-up
A condition isn't an action; it's a question with a yes/no answer.
See it in an activity

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