What is the result of cmp(3, 1)?
a) 1
b) 0
c) True
d) False
Explanation: cmp(x, y) returns 1 if x > y, 0 if x == y and -1 if x < y.
Which of the following is incorrect?
a) float(‘inf’)
b) float(‘nan’)
c) float(’56’+’78’)
d) float(’12+34′)
Explanation: ‘+’ cannot be converted to a float.
What does 3 ^ 4 evaluate to?
a) 81
b) 12
c) 0.75
d) 7
Explanation: ^ is the Binary XOR operator.