ExamVeda
Login
Home
21
What is the result of 3 + 4 * 5 ?
Discuss
Answer & Solution
Answer: Option B
Solution:
In Python, expressions are evaluated according to operator precedence, which determines the order in which operations are performed.

The multiplication operator (*) has higher precedence than the addition operator (+).

Therefore, in the expression 3 + 4 * 5, the multiplication is performed first.

First step: 4 * 5 = 20

Second step: 3 + 20 = 23

Thus, the final result of the expression is 23.

Hence, the correct answer is Option B: 23.
22
What is the result of (2 + 3) * 4 ?
Discuss
Answer & Solution
Answer: Option C
Solution:
Parentheses have the highest precedence, so the expression inside them is evaluated first.
23
What is the result of (2 + 3) * (5 - 1) ?
Discuss
Answer & Solution
Answer: Option A
Solution:
Parentheses have the highest precedence, so the expression inside them is evaluated first.
24
Which of the following operators has its associativity from right to left?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
25
What will be the value of the following Python expression?
float(4+int(2.39)%2)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
26
What is the result of 8 / 2 ** 2 ?
Discuss
Answer & Solution
Answer: Option C
Solution:
Exponentiation has higher precedence than division, so 2 ** 2 is evaluated first.
27
What is the result of 4 + 3 ** 2 % 2 ?
Discuss
Answer & Solution
Answer: Option B
Solution:
Exponentiation has higher precedence, so 3 ** 2 is evaluated first, then modulo, and finally addition.
28
What is the result of 2 ** 3 * 4 ?
Discuss
Answer & Solution
Answer: Option C
Solution:
Exponentiation and multiplication have the same precedence and are evaluated left to right.
29
The value of the expressions 4/(3*(2-1)) and 4/3*(2-1) is the same.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
30
Which of the following expressions is an example of type conversion?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board