GkSeries.com

Python Multiple Choice Questions(MCQs)& Answers

61 What is the result of the expression if x=15 and y=12:
[A] b1101
[B] 0b1101
[C] 12
[D] 1101
Answer: 12
62 Which of the following represents the bitwise XOR operator?
[A] &
[B] ^
[C] |
[D] !
Answer: ^

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

63 What is the value of this expression:

bin(10-2)+bin(12^4)

[A] 0b10000
[B] 0b10001000
[C] 0b1000b1000
[D] 0b10000b1000
Answer: 0b10000b1000
64 What is the two’s complement of -44?
[A] 1011011
[B] 11010100
[C] 11101011
[D] 10110011
Answer: 11010100
65 What is the output of the code shown below?

not(3>4)

not(1&1)

[A] True True
[B] True False
[C] False True
[D] False False
Answer: True False
66 What is the output of the code shown below?

class Truth:

pass

x=Truth()

bool(x)

[A] pass
[B] true
[C] false
[D] error
Answer: true
67 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: (6.0, 16.0)
68 What is the value of x if:

x = int(43.55+2/2)

[A] 43
[B] 44
[C] 22
[D] 22
Answer: 44
69 What is the value of the expression:

4+2**5//10

[A] 3
[B] 7
[C] 77
[D] 0
Answer: 7
70 What is the value of the following expression:

24//6%3, 24//4//2

[A] (1,3)
[B] (0,3)
[C] (1,0)
[D] (3,1)
Answer: (1,3)
71 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: 1.0
72 What will be the value of X in the following Python expression?

X = 2+9*((3*12)-8)/10

[A] 30.0
[B] 30.8
[C] 28.4
[D] 27.2

Answer: 27.2
73 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: 1.7 % 2
74 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: (1,3)
75 Which among the following list of operators has the highest precedence?

+, -, **, %, /, <<, >>, |

[A] <<, >>
[B] **
[C] |
[D] %
Answer: **
76 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: 4.0
77 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: 4.0 + float(3)
78 Which of the following expressions results in an error?
[A] float(‘10’)
[B] int(‘10’)
[C] float(’10.8’)
[D] int(’10.8’)
Answer: int(’10.8’)
79 What will be the value of the following Python expression?

4+2**5//10

[A] 3
[B] 7
[C] 77
[D] 0
Answer: 7
80 The expression 2**2**3 is evaluates as: (2**2)**3.
[A] True
[B] False
[C] May be true or false
[D] Can't be determined
Answer: False

Please share this page

Click Here to Read more questions

Teacher Eligibility Test