Boolean Logic
Predict Output Easy
Question
What does this code print?
Code
x = 5
print(x > 3 and x < 10)
Hint
5 > 3 and 5 < 10 are both true.
Explanation
x is 5. x > 3 is True. x < 10 is True. True and True is True. Output: True.
Related Resources
Related Lessons
- Conditions & Loops
Learn conditions and loops.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.