Conditionals and boolean logic in code
Lesson time ~50 min · 4 skills · Grades 7–10
What you’ll learn
- Basic if statementsNot started
Writing simple if statements that execute code when a condition is true
- Logical operators (and, or, not)Not started
Combining boolean expressions using AND, OR, and NOT operators
- Complex conditional expressionsNot started
Writing if statements with multiple conditions using logical operators
Before you start
You should already know
- Variables and assignment
- Basic program flow
Skills this builds on
- Boolean values and expressions
- Comparison operators
Notes for teachers
Start with concrete, relatable examples (age checks, grade boundaries). Use visual flowcharts to show decision paths. Practice with interactive coding exercises where students can immediately see results of their conditionals.
How this module was checked
Status: Approved