My code works fine when I run it in the Python IDLE, but does not work on the site
def checkio(array):
total = 0
if len(array) != 0:
for i in range(len(array)):
if i % 2 == 0:
total += i
total *= array[-1]
return total
else:
return 0
so what's the problem?
Created at: 2016/04/10 05:38; Updated at: 2016/07/04 09:13