I am sure this is something very simple but i just don't see it. Whenever i hit Run&Check i get this error ("IndexError: list index out of range, checkio,") if i delete the "result=result*lastPos" the index error disapears. Can Anyone shed some light on this? Thank you.
result=0
i=0
print (len(array))
while i < len(array):
result+=array[i]
i+=2
lastPos = array[-1]
result= result*lastPos
return result
Created at: 2015/02/13 07:56; Updated at: 2015/05/09 09:57