Python Programming (2180711) MCQs

MCQs of Introduction to Python

Showing 51 to 60 out of 170 Questions
51.
Which among the following list of operators has the highest precedence? +, -, **, %, /, <<, >>, |
(a) <<, >>
(b) **
(c) |
(d) %
Answer:

Option (b)

52.
What will be the value of the following Python expression? float(4+int(2.39)%2)
(a) 5.0
(b) 5
(c) 4.0
(d) 4
Answer:

Option (c)

53.
Which of the following expressions is an example of type conversion?
(a) 4.0 + float(3)
(b) 5.3 + 6.3
(c) 5.0 + 3
(d) 3 + 7
Answer:

Option (a)

54.
Which of the following expressions results in an error?
(a) float(‘10’)
(b) int(‘10’)
(c) float(’10.8’)
(d) int(’10.8’)
Answer:

Option (d)

55.
What will be the value of the following Python expression? 4+2**5//10
(a) 3
(b) 7
(c) 77
(d) 0
Answer:

Option (b)

56.
The expression 2**2**3 is evaluates as: (2**2)**3.
(a) TRUE
(b) FALSE
Answer:

Option (b)

57.
What will be the output of the following Python code snippet if x=1? x<<2
(a) 8
(b) 1
(c) 2
(d) 4
Answer:

Option (d)

58.
What will be the value of x in the following Python expression, if the result of that expression is 2? x>>2
(a) 8
(b) 4
(c) 2
(d) 1
Answer:

Option (a)

59.
What will be the output of the following Python expression? int(1011)?
(a) 1011
(b) 11
(c) 13
(d) 1101
Answer:

Option (a)

60.
What will be the output of the following Python expression if x=15 and y=12? x & y
(a) b1101
(b) 0b1101
(c) 12
(d) 1101
Answer:

Option (c)

Showing 51 to 60 out of 170 Questions