Python Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 31)
31.
What will be the output of the following code snippet?
def power(x, n=2):
    return x ** n

result = power(2, 3)
print(result)
8
6
64
2
Answer: Option
Explanation:
The function power raises 2 to the power of 3, resulting in 8.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.