Here:
http://docs.python.org/2/library/math.html[
^].
It does not use any operators, just the call. Formally, I answered.
However, the meaning of your question is not clear. Do you mean that you want to implement exponent using other functions as multiplication? For integer exponents of not? Note that "repeated multiplication" is only possible of this is an integer degree.
Is is a homework? Is this is an integer power, I'll just give you the idea: you should avoid doing N multiplications. For example, to calculate
N**5
, you need to calculate
N*N
, then multiply the result by itself, then multiply the result by
N
. This is just the hint. For numeric data, it makes no sense at all, but what to do if, for example, the operand is a matrix? If
N
is big, multiplying
N
times is not an option, Then the algorithm based on my hint is the way to go.
—SA