Quizzes

Python Operators Quiz


Welcome to this quiz on Python Operators!

Operators in Python allow us to perform operations on variables and values. This quiz will test your understanding of different types of operators, including arithmetic, comparison, logical, bitwise, assignment, and identity operators.

Each question is multiple-choice, and the answers are provided at the end. Let’s see how well you understand Python operators!

Table of Contents:


Operators Quiz


Quiz Questions

1. What will be the output of 5 + 3 * 2?

a) 16
b) 11
c) 13
d) 10

2. Which operator is used for exponentiation in Python?

a) ^
b) **
c) %
d) //

3. What will 10 % 3 return?

a) 1
b) 3
c) 0
d) 10

4. What is the result of 5 // 2?

a) 2.5
b) 2
c) 3
d) 5

5. What is the output of not (True and False)?

a) True
b) False
c) None
d) SyntaxError

6. Which operator is used for floor division?

a) /
b) //
c) %
d) **

7. What is the result of 2 ** 3 ** 2?

a) 64
b) 512
c) 9
d) 16

8. What does 10 & 7 evaluate to?

a) 3
b) 2
c) 7
d) 10

9. Which operator is used for bitwise OR?

a) |
b) &
c) ^
d) ~

10. What is the output of 10 | 4?

a) 14
b) 10
c) 4
d) 6

11. What will True + True return?

a) 2
b) 1
c) True
d) False

12. What is the result of 10 > 5 and 2 < 8?

a) True
b) False
c) None
d) Error

13. What does 10 == "10" evaluate to?

a) True
b) False
c) None
d) Error

14. What is the result of not 0?

a) True
b) False
c) 0
d) 1

15. Which operator is used to check if two variables reference the same object?

a) ==
b) is
c) in
d) and

16. What will 5 & 3 return?

a) 1
b) 3
c) 2
d) 5

17. What will 5 | 3 return?

a) 5
b) 3
c) 7
d) 2

18. What does ~5 evaluate to?

a) -5
b) -6
c) 6
d) 5

19. What will 10 != 10 return?

a) True
b) False
c) None
d) Error

20. What will 8 >> 2 return?

a) 2
b) 4
c) 1
d) 8


How did you do? 🎯

  • 18-20 correct → 🏆 Excellent! You’re a Python functions pro!
  • 14-17 correct → 👍 Great job! Keep practicing.
  • 10-13 correct → 🙂 Good, but there’s room for improvement.
  • Below 10 → 🤔 No worries! Review the concepts and try again.

by AICorr Team

We are proud to offer our extensive knowledge to you, for free. The AICorr Team puts a lot of effort in researching, testing, and writing the content within the platform (aicorr.com). We hope that you learn and progress forward.