• help! why this code not work?

Question related to mission Even the Last

 

def checkio(array): """ sums even-indexes elements and multiply at the last """ result = 0 for N in range(len(array)): if N % 2 == 0: result += array[N] return result * array[-1]

IndexError: list index out of range checkio, 9 <module>, 18