• in my IDE works great but Error in Checkio?

 

def checkio(array):

nlista=[]
while len(array)>0:
    for i in range(len(array)):
        if i % 2 == 0:
            nlista.append(array[i])


    sumarray=0
    for k in nlista:
        sumarray+=k
    sumarray= sumarray * (array[len(array)-1])

    return sumarray
return 0