Чекни:
res = 0
while True:
try:
a = int(input())
except(TypeError):
break
if a > 0:
res += a
print(res)
Чекни:
res = 0
while True:
try:
a = int(input())
except(TypeError):
break
if a > 0:
res += a
print(res)