Python and, or, not
Logical operators that combine or flip True/False conditions. and needs both True, or needs at least one True, and not reverses True to False (or False to True).
Understanding Python and, or, not in Years 7–8 Creating Digital Solutions
What it does: not flips the value of raining. The code inside the if runs when raining is False. With and, both score > 50 and time < 10 must be True for the if block to run. and needs BOTH sides to be True. 13 > 12 is True and 13 < 15 is True, so the answer is True. score > 50 is False. With and, one False makes the whole condition False. or only needs at least ONE side to be True. is_raining is True, so the result is True. not reverses a Boolean value. not True becomes False. Each side of and must be a full condition. You need to write x again after and.
Common mistakes: Python does not use && for 'and'. Write the word and: ok = age >= 12 and has_pass. Python's logical operators must be lowercase. AND causes an error. It should be: a = True and False.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 50–125) and word search (Modules 3–125).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
and, or, notFill in the Blanks
Spot the Error
Student with a class code? Join your class →