JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
Python Operators Quiz
There are
20 questions based on Python Operators
Sign in to Google
to save your progress.
Learn more
* Indicates required question
Q1. What is the output of the following code?
print(5 + 3 * 2)
*
4 points
16
11
13
10
Q2. Which operator is used to check if two values are equal?
*
4 points
=
==
!=
>=
Required
Q3. What is the output of 10 // 3?
*
4 points
3.33
3
4
3.0
Q4. What does the ^ operator do in Python's bitwise operations?
*
4 points
Bitwise AND
Bitwise OR
Bitwise XOR
Bitwise NOT
Q5. What does the not operator do in Python?
*
4 points
Negates a value
Multiplies values
Divides values
Checks equality
Q6. Which of the following is a membership operator?
*
4 points
in
is
==
and
Q7. What is the output of 2 ** 3?
*
4 points
6
8
9
16
Q8. What is the result of the following expression?
print(4 > 2 and 3 < 5)
*
4 points
True
False
Error
None
Q9. What is the output of 5 % 2?
*
4 points
2.5
1
2
0
Q10. What does the is operator do?
*
4 points
Checks for equality
Checks if two objects have the same memory location
Checks for membership
Assigns a value
Q11. What will be the output of this code?
a = 10
a += 5
print(a)
*
4 points
10
15
20
Error
Q12. Which operator is used to concatenate strings in Python?
*
4 points
+
*
&
|
Q13. What is the output of 10 < 5 or 3 > 1?
*
4 points
True
False
Error
None
Q14. What does the // operator do in Python?
*
4 points
Finds remainder
Performs floor division
Divides normally
None of the above
Q15. Which of the following is a comparison operator?
*
4 points
=
==
+
and
Q16. What is the result of the following code?
print("Python" in "Python Programming")
*
4 points
True
False
Error
None
Q17. Which of the following operators has the highest precedence?
*
4 points
+
**
*
or
Q18. What will be the output of this code?
x = [1, 2, 3]
y = [1, 2, 3]
print(x is y)
*
4 points
True
False
Error
None
Q19. What does the and operator do?
*
4 points
Combines conditions
Checks membership
Performs addition
None of the above
Q20. What is the result of the following code?
print(4 * 2 // 3)
*
4 points
2
2.666
4
3
Submit
Clear form
Forms
This content is neither created nor endorsed by Google.
Report Abuse
Terms of Service
Privacy Policy
Help and feedback
Contact form owner
Help Forms improve
Report