Computer Science, asked by XxTheQuestionerxX, 2 months ago

What Is Output Of Following Python C.ode?

def power(a,b):
if b==0:
return 1
else:
return a*power(a,b-1)
print("enter only the positive number below")
num=int(input("enter base number:"))
p=int(input("raised to the power of:"))
result=power(num,p)
print(num,"raised to the power of",p,"is",result

Answers

Answered by Anonymous
19

Answer:

After Running Above Python C.ode The Output produced is Given in The Above Attachment.

Python Version is Python IDLE 3.8.6 shell

The Answer is an Original answer by Me.

after Interpreting C.odes .

Attachments:
Answered by Anonymous
0

Answer:

def power(a,b):

if b==0:

return 1

else:

return a*power(a,b-1)

print("enter only the positive number below")

num=int(input("enter base number:"))

p=int(input("raised to the power of:"))

result=power(num,p)

print(num,"raised to the power of",p,"is",result

Similar questions