Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m trying to find X^Y without using the shorthand, but i keepgetting the wrong

ID: 3616978 • Letter: I

Question

I'm trying to find X^Y without using the shorthand, but i keepgetting the wrong final values for X.. I'm new to python so bare with me. I tried printing theintermediate values to sort of debug it but still had no luck. Can someone direct me towhat I'm doing wrong here?
x = input("Please enter a base: ") y = input("Please enter a power: ") counter = 1 while (counter <= y):    x = x*x    print x    print    counter = counter+1          print "The answer is", x I'm trying to find X^Y without using the shorthand, but i keepgetting the wrong final values for X.. I'm new to python so bare with me. I tried printing theintermediate values to sort of debug it but still had no luck. Can someone direct me towhat I'm doing wrong here?
x = input("Please enter a base: ") y = input("Please enter a power: ") counter = 1 while (counter <= y):    x = x*x    print x    print    counter = counter+1          print "The answer is", x

Explanation / Answer

nevermind. my logic was totally off. i figured it out