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)
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:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers