from random import randint
mass = [randint(-20, 10) for i in range(10)]
summa = 0
k = 0
for i in range(10):
if mass[i] > 0:
summa += mass[i]
else:
k += 1
print(summa, k)
Объяснение:
from random import randint
mass = [randint(-20, 10) for i in range(10)]
summa = 0
k = 0
for i in range(10):
if mass[i] > 0:
summa += mass[i]
else:
k += 1
print(summa, k)
Объяснение: