def index_power(array, n):
if len(array) > n:
number = get_pow(array[n],n)
else:
number = -1
return number
def get_pow(a,b):
number=1
for i in range(b):
number = number*a
return number
if len(array) > n:
number = get_pow(array[n],n)
else:
number = -1
return number
def get_pow(a,b):
number=1
for i in range(b):
number = number*a
return number