QuizAnswer
Home
Contact
Say hello -
quizanswers.mail@gmail.com
1. Evaluate the expression given below if A = 16 and B = 15.
A % B // A
Answer.
0
2. Which operator has its associativity from right to left?
Answer.
**
3. Which of the following expressions involves coercion when evaluated in Python?
• 4.7 - 1.5
• 7.9 * 6.3
• 1.7 % 2
• 3.4 + 4.6
Answer.
1.7 % 2
4. What will be the output of the following Python expression?
24//6%3, 24//4//2
Answer.
(1,3)
5. What will be the value of x in the following Python expression, if the result of that expression is 2?
x>>2
Answer.
8
6. What will be the output of the following Python expression?
int(1011)?
Answer.
1011
7. Bitwise _________ gives 1 if either of the bits is 1 and 0 when both of the bits are 1.
Answer.
XOR
8. What will be the output of the following Python expression?
4^12
Answer.
8
9. What will be the output of the following Python code snippet?
not(3>4)
not(1&1)
Answer.
True
False
10. What will be the output of the following Python code?
['f', 't'][bool('spam')]
Answer.
t
Prev
Next