← Python

Boolean Logic

and, or, not combine boolean values: and requires both True; or requires one True; not flips the value

What it does: '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. 5 == 5 is True, then not True is False. Python's boolean operators are lowercase: and, or, not — not AND, OR, NOT. A data type with only two values: True or False.

Common mistakes: Booleans must be capitalized True and False, not true and false. Boolean operators are lowercase and, not AND.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a journey and assign it to your class.

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What does True and False return?
FalseTrue
Matches
❌ if x > 0 AND x < 10:
Error: Use lowercase 'and'
Applying
Meanings
Term
Boolean
Meaning
A data type with only two values: True or False.
Practice
print(True and True)
Testing
Gaps
print(True True)
Check Answer
Spots
1x = True
2print(true and false)

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Galaxy Phoenix' badge — Python Master, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does True and False return?
A. False ✓
B. True
and returns True only if BOTH sides are True
2. What does True or False return?
A. False
B. True ✓
or returns True if at least ONE side is True
3. What does not True return?
A. False ✓
B. True
not flips the boolean — not True becomes False
4. What does False and False return?
A. True
B. False ✓
and needs both sides to be True — neither side is True here
5. What does False or True return?
A. True ✓
B. False
or returns True when at least one side is True — and True is here

Match the Pairs

if x > 0 AND x < 10: Error: Use lowercase 'and'
result = true Error: Use True not true
x > 0 and x < 10 Valid: Both must be True
not False Ok: Returns True
print(True or False) Output: True
print(True and False) Output: False

Key Term

Boolean
A data type with only two values: True or False.~~and

Fill in the Blanks

1. print(True and True)
2. print(True or False)
3. print(not False)
4. print(5 > 3 and 2 < 10)
5. print(not (10 == 5))

Spot the Error

Question 1
A x = True
B print(true and false)
C print(x)
Line B — Booleans must be capitalized True and False, not true and false
Question 2
A a = True
B print(True AND False)
C b = False
Line B — Boolean operators are lowercase and, not AND
Question 3
A x = True
B print(True & False)
C print(x)
Line B — Use the word 'and', not the & symbol
Question 4
A a = False
B print(True | False)
C print(a)
Line B — Use the word 'or', not the | symbol
Question 5
A x = TRUE
B print(x)
C print(not x)
Line A — Python Booleans use title case True not all caps TRUE
For Teachers

Create a free class, add this module to a journey, and track who's stuck.

Create a free teacher account →

No credit card. No setup fee. Make a class and invite students in under three minutes.

For Students

Practice this topic interactively, track progress, and unlock badges.

Start Learning Free →

Have a class code?