I could not think of any better way to raise to power, except this, but how do I refactor it? I should only use while loop, not for loop, not x**y.
I shall not use pow(x,y)
result = 1
base = 3
counter = 1
degree = 4
while counter <= degree:
result = base * result
counter += 1
print("counter %d and the result %d" %(counter, result))
print("result is ", result)