What does 3 ^ 4 evaluate to? a) 81 b) 12 c) 0.75 d) 7 Answer: d Explanation: ^ ...
View QuestionWhat is the result of round(0.5) – round(-0.5)?
a) 1.0 b) 2.0 c) 0.0 d) Value depends on Python version Answer: d
View QuestionWhich of the following is incorrect?
a) float(‘inf’) b) float(‘nan’) c) float(’56’+’78’) d) float(’12+34′) Answer: ...
View QuestionWhat is the result of cmp(3, 1)?
a) 1 b) 0 c) True d) False Answer: a Explanation: cmp(x, y) returns 1 if x > ...
View QuestionWhich of the following is incorrect?
a) x = 0b101 b) x = 0x4f5 c) x = 19023 d) x = 03964 Answer: d Explanation: ...
View QuestionWhat does ~~~~~~5 evaluate to?
What does ~~~~~~5 evaluate to? a) +5 b) -11 c) +11 d) -5 Answer: a Explanation: ...
View QuestionWhat does ~4 evaluate to?
a) -5 b) -4 c) -3 d) +3 Answer: a Explanation: ~x is equivalent to -(x+1).
View QuestionWhat is the type of inf?
a) Boolean b) Integer c) Float d) Complex Answer: c Explanation: Infinity is ...
View QuestionWhich of the following is not a complex number?
a) k = 2 + 3j b) k = complex(2, 3) c) k = 2 + 3l d) k = ...
View QuestionWhat is the output of print 0.1 + 0.2 == 0.3?
What is the output of print 0.1 + 0.2 == 0.3? a) True b) False c) Machine dependent d) Error ...
View Question