Python Programming - Tricky Questions - Discussion

Discussion Forum : Tricky Questions - General Questions (Q.No. 39)
39.
What is the output of the following Python code?
x = 2
y = 3
result = x * y ** x
print(result)
12
18
24
8
Answer: Option
Explanation:
Exponentiation (**), performed before multiplication, results in 3 ** 2, and then multiplied by 2.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.