Skip to content
dreamcode
dreamcode
Back to map
Boolean operators · Lesson 6 of 44
+15 XP on finish
PYTHON BASICS

Combining checks

Combine boolean values using logical operators: and (True if both sides are True), or (True if at least one side is True), and not (flips True to False and vice versa).

How it reads
day == "Sunday" and temp > 20 requires both statements to be True
not (temp < 10) returns True if temp is 10 or greater
Cloud tip: Use parentheses to group logical checks and make the order of comparison clear.
main.py
PYTHON
real Python, runs in your browser
CONSOLE
- run your code to see output -