Vidyalelo
Python · Q88

Functions in Python

Programming · Python · question 88

Q88

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)

A.
212
32
B.
9
27
Answer
C.
567
98
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board