arrey = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
lst = []
for i in arrey:
if i%2 == 0 and i <= 11:
lst.append(i)
print(sum(lst))
Результат:
30
arrey = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
lst = []
for i in arrey:
if i%2 == 0 and i <= 11:
lst.append(i)
print(sum(lst))
Результат:
30