I would like to give some feedback about ...
From: http://www.checkio.org/mission/index-power/solve/
HTTP_USER_AGENT:
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
My Code:
def index_power(array,n):
if n == 0:
return 1
else:
if n > len (array):
return -1
else:
return array[n]**n
Created at: 2014/09/09 14:57; Updated at: 2016/04/22 13:22