номер 1:
numbers = [1,23,4,-1,54,-180,-90,0,-12]
print(sum([i for i in numbers if i == -abs(i)]))
номер 2:
numbers = [22,22,4,1,54,23,88,41,33,77,5]
count = 1
for i in numbers:
if i%2 == 0:
count*=i
print(count)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
номер 1:
numbers = [1,23,4,-1,54,-180,-90,0,-12]
print(sum([i for i in numbers if i == -abs(i)]))
номер 2:
numbers = [22,22,4,1,54,23,88,41,33,77,5]
count = 1
for i in numbers:
if i%2 == 0:
count*=i
print(count)