Thank you very much for your help.

I think the "result = self.power(x, n//2)" is supposed to work.

Then I simply changed

{

return 1/self.power(x, -n)

}

from

{

return 1/self.power(x, n)

}

then things all worked. I am happy about that. But it's weird ... I still don't understand why the negative one matters ...

And for the code next, I simply use n//2 instead of n/2. Then things are working.