Python Boolean and Comparison Quiz

This Python booleans quiz checks truthiness, comparison operators and how and / or really work. It is a good check for beginners writing their first if statements.

Easy 10 questions ~5 minutes Pass at 80% Python 3.12

Choose a mode

Playing as a guest: sign in to keep your XP and streak.

Sample question

Question 1 of 10

What does this print?

print(bool(""))
Show the answer

B. False An empty string is falsy, so bool("") is False. Any string with at least one character is truthy.

What this quiz covers

  • Truthy and falsy values
  • Chained comparisons like a < b < c
  • What and and or return
  • == vs is, and checking for None
  • Comparing values of different types

Questions people ask

Do I need an account?

No. Anyone can play. Sign in to keep your XP, streak, badges and history.

Which Python version?

Python 3.12. Every question about output was checked by running the code.

Can I retake it?

Yes. Your best score is kept, and the questions and answers are shuffled each time.