Skip to main content

Conditionals and boolean logic in code

Lesson time ~50 min · 4 skills · Grades 7–10

What you’ll learn

  1. Basic if statementsNot started

    Writing simple if statements that execute code when a condition is true

  2. If-else statementsNot started

    Using if-else to handle both true and false cases

  3. Logical operators (and, or, not)Not started

    Combining boolean expressions using AND, OR, and NOT operators

  4. 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