MCQ on Operators in Python – 2

Q1) In the Python statement x = a + 3 – b:

a and b are ____.
a + 3 – b is ____.

a) operators, a statement
b) operands, an equation
c) operands, an expression
d) terms, a group

View Answer Answer:- c) operands, an expression

Q2) Which of the following operators has the highest precedence?

a) +
b) *
c) &
d) not

View Answer Answer:- b) *

Q3) Which is the correct operator for power(XY)?

a) X^Y
b) X^^Y
c) X**Y
d) None of the mentioned

View Answer Answer:- c) X**Y

Q4) What is the output of this expression, 53 * 2?

a) 45
b) 30
c) 16
d) None of these

View Answer Answer:- a) 45

Q5) The expression Int(x) implies that the variable x is converted to an integer.

a) True
b) False

View Answer Answer:- a) True

Q6) Mathematical operations can be performed on a string.

a) True
b) False

View Answer Answer:- b) False

Q7) Bitwise shift operators (<<, >>) have higher precedence than the Bitwise And(&) operator.

a) False
b) True

View Answer Answer:- b) True

Q8) What is the value of the expression 50/5?

a) 5
b) 5.0
c) Error

View Answer Answer:- b) 5.0

Q9) What is the output of the given below program?

x = 5
y = x -= 3
print(y)

a) 8
b) 2
c) None
d) Error

View Answer Answer:- d) Error

Q10) What is the output of the given below program?

a = 25
b = 20
print(a and b)

a) 25
b) 20
c) 45
d) Error

View Answer Answer:- b) 20

Also See:- Python String MCQ

Leave a Comment

Your email address will not be published.