Python Programming (2180711) MCQs

MCQs of Introduction to Python

Showing 41 to 50 out of 170 Questions
41.
What will be the value of x in the following Python expression? x = int(43.55+2/2)
(a) 43
(b) 44
(c) 22
(d) 23
Answer:

Option (b)

42.
What is the value of the following expression? 2+4.00, 2**4.0
(a) (6.0, 16.0)
(b) (6.00, 16.00)
(c) (6, 16)
(d) (6.00, 16.0)
Answer:

Option (a)

43.
Which of the following is the truncation division operator?
(a) /
(b) %
(c) //
(d) |
Answer:

Option (c)

44.
What are the values of the following Python expressions? 2**(3**2) (2**3)**2 2**3**2
(a) 64, 512, 64
(b) 64, 64, 64
(c) 512, 512, 512
(d) 512, 64, 512
Answer:

Option (d)

45.
What is the value of the following expression? 8/4/2, 8/(4/2)
(a) (1.0, 4.0)
(b) (1.0, 1.0)
(c) (4.0. 1.0)
(d) (4.0, 4.0)
Answer:

Option (a)

46.
What is the value of the following expression? float(22//3+3/3)
(a) 8
(b) 8.0
(c) 8.3
(d) 8.33
Answer:

Option (b)

47.
What will be the output of the following Python expression? print(4.00/(2.0+2.0))
(a) Error
(b) 1.0
(c) 1.00
(d) 1
Answer:

Option (b)

48.
What will be the value of X in the following Python expression? X = 2+9*((3*12)-8)/10
(a) 30
(b) 30.8
(c) 28.4
(d) 27.2
Answer:

Option (d)

49.
Which of the following expressions involves coercion when evaluated in Python?
(a) 4.7 – 1.5
(b) 7.9 * 6.3
(c) 1.7 % 2
(d) 3.4 + 4.6
Answer:

Option (c)

50.
What will be the output of the following Python expression? 24//6%3, 24//4//2
(a) (1,3)
(b) (0,3)
(c) (1,0)
(d) (3,1)
Answer:

Option (a)

Showing 41 to 50 out of 170 Questions