Computer Science, asked by vikkychoudhary2004, 3 months ago

pls tell the answer of this question​

Attachments:

Answers

Answered by BrainlyProgrammer
3

Question:-

  • Rewrite the code using while loop.

Answer:-

a=(int)(input("Enter base"))

b=(int)(input("Enter power"))

s=1

for I in range(b):

s*=a

Converting into while loop...

a=(int)(input("Enter base"))

b=(int)(input("Enter power"))

s,i=1,1

while(i<=b):

s*=a

i+=1

Similar questions