ExamVeda
Login
Home
41
Evaluate the expression given below if A = 16 and B = 15.
A % B // A
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
42
What will be the output of the following Python expression?
print(4.00/(2.0+2.0))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
43
What is the result of 10 - 3 + 2 ?
Discuss
Answer & Solution
Answer: Option B
Solution:
Addition and subtraction have the same precedence and are evaluated left to right.
44
What will be the output of the following Python expression?
24//6%3, 24//4//2
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
45
What is the result of 8 - 6 / 2 ?
Discuss
Answer & Solution
Answer: Option B
Solution:
Division has higher precedence, so 6 / 2 is evaluated first, then subtracted from 8.
46
What is the result of 5 % 3 ** 2 ?
Discuss
Answer & Solution
Answer: Option C
Solution:
Exponentiation has higher precedence, so 3 ** 2 is evaluated first, then modulo.
47
What is the result of 12 // (4 * 2) ?
Discuss
Answer & Solution
Answer: Option A
Solution:
Parentheses have the highest precedence, so the expression inside them is evaluated first.
48
Which operator has the highest precedence in Python?
Discuss
Answer & Solution
Answer: Option D
Solution:
The exponentiation (**) operator has the highest precedence.
49
What is the result of 3 ** 2 // 3 ?
Discuss
Answer & Solution
Answer: Option A
Solution:
Exponentiation has higher precedence, so 3 ** 2 is evaluated first, then floor division.
50
What is the result of 10 / 2 ** 2 * 2 ?
Discuss
Answer & Solution
Answer: Option A
Solution:
Exponentiation has higher precedence, so 2 ** 2 is evaluated first, then multiplication and division follow.