number_list = []
while True:
number_list.append(int(raw_input("Enter Number: ")))
if number_list[-1] == -10:
break
s = 0 #sum
for i in number_list[:-1]:
if i % 2 == 0:
s += i
print "Sum of all the even numbers ", s
Comments
Leave a comment