Boolean Logic, online
Six activities your students do on their own devices. See who's finished, and their scores.
Learning
Understanding
Testing
Boolean Logic in one minute
What students need to know
'and' returns True only when both sides are True. 'not' flips the boolean — not False gives True.
or returns True if at least ONE side is True. Python booleans are True and False — capital T and F.
Mistakes students make
- Booleans must be capitalized True and False, not true and false.
- Boolean operators are lowercase and, not AND.
- Use the word 'and', not the & symbol.
- Use the word 'or', not the | symbol.
PREVIOUS · MODULE 12Comparison Operators
YOU ARE HERE · MODULE 13Boolean Logic
NEXT · MODULE 14If Statements
What students will learn in this module
Every question in Module 13
Quick questions
- What does True and False return?AFalseBTrue
- What does True or False return?AFalseBTrue
- What does not True return?AFalseBTrue
- What does False and False return?AFalseBTrue
- What does False or True return?AFalseBTrue
Key terms
Students type the meaning of:
Booleanandornot
Match the pairs
if x > 0 AND x < 10:Match it to what it doesresult = trueMatch it to what it doesx > 0 and x < 10Match it to what it doesnot FalseMatch it to what it doesprint(True or False)Match it to what it doesprint(True and False)Match it to what it doesFill in the blanks
print(True ___ True)
print(True __ False)
print(___ False)
print(5 > 3 ___ 2 < 10)
print(___ (10 == 5))
Spot the error
Question 1
Ax = TrueBprint(true and false)Cprint(x)
Question 2
Aa = TrueBprint(True AND False)Cb = False
Question 3
Ax = TrueBprint(True & False)Cprint(x)
Question 4
Aa = FalseBprint(True | False)Cprint(a)
Question 5
Ax = TRUEBprint(x)Cprint(not x)
