?
What will be the output of the following Python code?
What will be the output of the following Python code?
def power(x, y=2):
r = 1
for i in range(y):
r = r * x
return r
print power(3)
print power(3, 3)
def power(x, y=2):
r = 1
for i in range(y):
r = r * x
return r
print power(3)
print power(3, 3)
Join the Discussion
Login to post a comment or share your explanation.
Login