Hands-On Science Lab

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