Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
index power solution in Clear category for Index Power by Nirmala
def index_power(array, n):
"""
Find Nth power of the element with index N.
"""
n = int(n)
if n < len(array):
i = array[n]
i_int = int(i)
p = i_int ** n
elif n >= len(array):
p = -1
return p
Nov. 2, 2016