даны 10 целых чисел определить сумму тех из них которые оканчиваются нулем (Python)​

Ответы

Ответ дал: demianwolfssd
0

1 вариант:

nums = map(int, input().split())

result = 0

for num in nums:

   if not num % 10: result += num

print(result)

2 вариант (в одну строку):

print(sum(filter(lambda x: True if not x % 10 else False, map(int, input().split()))))

Вас заинтересует