Welcome to this quiz on Python Operators!
Operators in Python enable us to carry out operations on variables and values. This quiz will check your understanding of several types of operators, together with arithmetic, comparability, logical, bitwise, project, and id operators.
Every query is multiple-choice, and the solutions are offered on the finish. Let’s see how properly you perceive Python operators!
Desk of Contents:
Python quizzes for inexperienced persons sequence
Quiz Questions
1. What would be the output of 5 + 3 * 2?
a) 16b) 11c) 13d) 10
Reply
b) 11
2. Which operator is used for exponentiation in Python?
a) ^b) **c) %d) //
Reply
b) **
3. What’s going to 10 % 3 return?
a) 1b) 3c) 0d) 10
Reply
a) 1
4. What’s the results of 5 // 2?
a) 2.5b) 2c) 3d) 5
Reply
b) 2
5. What’s the output of not (True and False)?
a) Trueb) Falsec) Noned) SyntaxError
Reply
a) True
6. Which operator is used for ground division?
a) /b) //c) %d) **
Reply
b) //
7. What’s the results of 2 ** 3 ** 2?
a) 64b) 512c) 9d) 16
Reply
b) 512
8. What does 10 & 7 consider to?
a) 3b) 2c) 7d) 10
Reply
b) 2
9. Which operator is used for bitwise OR?
a) |b) &c) ^d) ~
Reply
a) |
10. What’s the output of 10 | 4?
a) 14b) 10c) 4d) 6
Reply
a) 14
11. What’s going to True + True return?
a) 2b) 1c) Trued) False
Reply
a) 2
12. What’s the results of 10 > 5 and a pair of < 8?
a) Trueb) Falsec) Noned) Error
Reply
a) True
13. What does 10 == “10” consider to?
a) Trueb) Falsec) Noned) Error
Reply
b) False
14. What’s the results of not 0?
a) Trueb) Falsec) 0d) 1
Reply
a) True
15. Which operator is used to examine if two variables reference the identical object?
a) ==b) isc) ind) and
Reply
b) is
16. What’s going to 5 & 3 return?
a) 1b) 3c) 2nd) 5
Reply
c) 2
17. What’s going to 5 | 3 return?
a) 5b) 3c) 7d) 2
Reply
c) 7
18. What does ~5 consider to?
a) -5b) -6c) 6d) 5
Reply
b) -6
19. What’s going to 10 != 10 return?
a) Trueb) Falsec) Noned) Error
Reply
b) False
20. What’s going to 8 >> 2 return?
a) 2b) 4c) 1d) 8
Reply
a) 2