Q1. Which operator is used for addition in Python?
✅ Correct Answer: (B) +
📘 Explanation: The + operator is used to add two values.
📘 Explanation: The + operator is used to add two values.
Q2. Which operator is used to find the remainder of a division?
✅ Correct Answer: (C) %
📘 Explanation: The modulus % operator returns the remainder.
📘 Explanation: The modulus % operator returns the remainder.
Q3. What does the ** operator do?
✅ Correct Answer: (C) Exponentiation
📘 Explanation: ** is used for raising a number to a power.
📘 Explanation: ** is used for raising a number to a power.
Q4. Which operator performs floor division?
✅ Correct Answer: (B) //
📘 Explanation: // returns the quotient without the decimal part.
📘 Explanation: // returns the quotient without the decimal part.
Q5. Which of the following is a comparison operator?
✅ Correct Answer: (B) ==
📘 Explanation: == compares two values for equality.
📘 Explanation: == compares two values for equality.
Q6. What is the output of 10 > 5?
✅ Correct Answer: (A) True
📘 Explanation: 10 is greater than 5, so the result is True.
📘 Explanation: 10 is greater than 5, so the result is True.
Q7. Which operator is used for logical AND?
✅ Correct Answer: (B) and
📘 Explanation: Python uses the keyword and for logical AND.
📘 Explanation: Python uses the keyword and for logical AND.
Q8. Which operator is used for logical OR?
✅ Correct Answer: (A) or
📘 Explanation: Python uses or for logical OR operations.
📘 Explanation: Python uses or for logical OR operations.
Q9. Which operator is used to assign a value?
✅ Correct Answer: (B) =
📘 Explanation: The assignment operator = assigns values.
📘 Explanation: The assignment operator = assigns values.
Q10. Which operator checks whether two values are NOT equal?
✅ Correct Answer: (B) !=
📘 Explanation: != returns True if values are different.
📘 Explanation: != returns True if values are different.
Q11. What is the output of 5 == 5?
✅ Correct Answer: (A) True
📘 Explanation: Both values are equal, so result is True.
📘 Explanation: Both values are equal, so result is True.
Q12. Which operator is used to check membership in a sequence?
✅ Correct Answer: (A) in
📘 Explanation: in checks if a value exists in a sequence.
📘 Explanation: in checks if a value exists in a sequence.
Q13. Which operator checks object identity?
✅ Correct Answer: (B) is
📘 Explanation: is checks whether both variables point to the same object.
📘 Explanation: is checks whether both variables point to the same object.
Q14. What is the output of 10 // 3?
✅ Correct Answer: (B) 3
📘 Explanation: Floor division removes decimal values.
📘 Explanation: Floor division removes decimal values.
Q15. Which operator is used for bitwise AND?
✅ Correct Answer: (C) &
📘 Explanation: & performs bitwise AND.
📘 Explanation: & performs bitwise AND.
Q16. Which operator is used to increment a value by 1?
✅ Correct Answer: (B) +=1
📘 Explanation: Python does not support ++. Use += 1.
📘 Explanation: Python does not support ++. Use += 1.
Q17. What is the output of not True?
✅ Correct Answer: (B) False
📘 Explanation: not reverses the Boolean value.
📘 Explanation: not reverses the Boolean value.
Q18. Which operator has the highest precedence?
✅ Correct Answer: (C) **
📘 Explanation: Exponentiation (**) has the highest precedence.
📘 Explanation: Exponentiation (**) has the highest precedence.
Q19. Which operator is used to combine strings?
✅ Correct Answer: (C) +
📘 Explanation: + concatenates strings.
📘 Explanation: + concatenates strings.
Q20. Which operator is used for bitwise OR?
✅ Correct Answer: (C) |
📘 Explanation: | performs bitwise OR operations.
📘 Explanation: | performs bitwise OR operations.