• code is not running

Question related to mission Index Power

 

my code is running correctly in python compiler but it is not validating here. CODE : -

array=input ('enter array : ' )
n=input ('enter index : ')
def index_array (a,n):
 if (n>len(array)-1) :
     print (-1)
 else :
     print array[n]**n

index_array(array,n)