Q8
What is the result of 2 + 3 * 4 ?
A.
14
AnswerB.
20
C.
15
D.
10
Answer: Option A
Solution
Answer: Option A
Solution:
In Python, arithmetic operations follow precedence rules:
Multiplication (*) has higher precedence than addition (+).
So, the expression 2 + 3 * 4 is evaluated as:
First, perform the multiplication: 3 * 4 = 12
Then, add 2 to the result: 2 + 12 = 14
Therefore, the result of 2 + 3 * 4 is 14.