Computing · Stage 5

Combined Conditions (AND / OR)

Coding & Systems · selection · join two checks with AND (both) and OR (at least one)

✦ Computing📘 Stage 5 · S5⏱ ~12 min🧒 Ages 9–10★ Free to start
I can combine conditions with AND and OR.
Kavi the owl for Computing
📖

Kavi's Two-Lock Treehouse Door

Kavi built a treehouse with a clever door. "It should open only for a friend who also knows the password," said Kavi. So the door checks two things at once: IF it is a friend AND they know the password, THEN open. With AND, both must be true — miss one and the door stays shut. Next Kavi wired the smoke alarm a different way: ring IF smoke OR heat. With OR, just one is enough to set it off. "Joining two checks with AND or OR makes a combined condition," Kavi hooted, "and the joiner decides how many parts must be true!"

🎓

What your child will learn

1AND needs both · OR needs oneA combined condition joins two checks together. The joiner word — AND or OR — decides how many parts must be true for the whole thing to be true. Tap each part to hear its job.
2Which joiner did you use?AND and OR join the same two checks but give different answers. Think about how many parts must be true before the whole condition turns true.
3Both parts must be TRUE for ANDWatch the treehouse door check TWO things joined by AND. Press ▶ Run and follow each check — the door opens only if both say YES.
4Read the combined rule, decideRead the OR rule, check each part, then say what happens. Reveal to check your thinking.
🔍

A peek inside

Rule: the gate opens IF you have a ticket AND you are over 120cm. You have a ticket, but you are only 110cm. Does the gate open?
AND needs BOTH parts true — the ticket part is true, but 110cm is NOT over 120cm, so that part is false

Try this at home: "A AND B" is true only when ____ parts are true.

Ready to play and learn?

Start the free interactive lesson, or print the handout for screen-free play.

Part of Computing · Stage 5 · S5 on KAVI Academy — a secular, whole-child learning platform for ages 5–12.