← Back to course
Code Crew G3 / Week 09 / Wednesday
3/6
Week 09 Β· Boolean Logic

Wednesday

// True, false, AND/OR

Wednesday: Word Riddles

Rocket and Raven walk to the park. They reach a busy crosswalk. Rocket wants to dash across.

"Wait," Raven says. "What do you notice?" Rocket looks up. "The light is green!"

"Is a car coming too?" Raven asks. Nova hovers beside them. "Two checks must both be true," she hints. Let's solve some true and false riddles.

Decide TRUE or FALSE for each.

(2 + 2 == 4) AND (a dog says 'meow') β†’ ____
(it is sunny) OR (it is dark outside) β†’ ____ (right now)
NOT (5 > 10) β†’ ____
(I have shoes on) AND NOT (I have a hat) β†’ ____ (right now)

Build your own

Write a sentence using AND, OR, NOT. Mark T or F.

(__________________) AND (__________________) β†’ ____
(__________________) OR (__________________) β†’ ____
NOT (__________________) β†’ ____

Traffic Light Logic

Cross the street? Use Boolean rules.

can_cross =  (light is GREEN)  AND  NOT (a car is coming)
lightcar coming?can_cross?
GREENno?
GREENyes?
REDno?
REDyes?
WHY THIS EXERCISEThis is real-life Boolean logic: combining two conditions to make a safe decision.

Boolean Riddles

USE THE CROSSING RULE
  • Read the question.
  • Tap your answer.
can_cross = GREEN AND NOT car coming. The light is GREEN. A car is coming. can_cross?
The light is RED. No car is coming. can_cross?
Which word means at least one is true?
A No Parking sign uses which Boolean word?
Ice is cold AND fire is hot. TRUE or FALSE?
Rocks can sing OR the Moon is made of paper. TRUE or FALSE?
NOT (ice is cold). TRUE or FALSE?
StatementTrue or false?
The sky is above us AND the ground is below us.?
Water is wet AND rocks are soft.?
A week has 7 days OR a day has 50 hours.?
NOT (a square has 4 sides).?
WHY THIS EXERCISEAND, OR and NOT work on any TRUE or FALSE facts.
snack_time = (it is 3:00) AND (homework is done). It is 3:00. Homework is not done. What is snack_time?
WHY THIS EXERCISEOne FALSE part makes the whole AND rule FALSE.
Try Without Paper
At dinner, ask: 'Is dessert AND vegetables both true tonight?'
(Watch a parent's face do the math.)
← Tuesday