ExamVeda
Login
Home
1
What is the result of 10 / 2 * 3 ?
Discuss
Answer & Solution
Answer: Option A
Solution:
Multiplication and division have the same precedence and are evaluated left to right.
2
What is the result of 2 ** 3 ** 2 ?
Discuss
Answer & Solution
Answer: Option B
Solution:
Exponentiation is right-associative, so the expression is evaluated as 2 ** (3 ** 2).
3
What is the result of 5 - 2 + 1 ?
Discuss
Answer & Solution
Answer: Option B
Solution:
In Python, operators have specific precedence levels that determine the order in which operations are performed.

Subtraction (-) and addition (+) operators have the same precedence level and are evaluated from left to right (left associativity).

In the expression 5 - 2 + 1:
First, 5 - 2 is evaluated, resulting in 3.
Then, 3 + 1 is evaluated, resulting in 4.

Thus, the result of the expression 5 - 2 + 1 is 4.
4
The expression 2**2**3 is evaluates as: (2**2)**3.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
5
What will be the value of the following Python expression?
4+2**5//10
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
6
What is the result of 2 * 3 % 4 ?
Discuss
Answer & Solution
Answer: Option B
Solution:
Multiplication and modulo have the same precedence and are evaluated left to right.
7
What is the result of 12 // 4 / 2 ?
Discuss
Answer & Solution
Answer: Option A
Solution:
The // and / operators have the same precedence and are evaluated left to right.
8
What is the result of 2 + 3 * 4 ?
Discuss
Answer & 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.
9
Which of the following is the truncation division operator?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
10
Which of the following expressions involves coercion when evaluated in Python?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board