Untitled

 avatar
unknown
python
10 months ago
386 B
2
Indexable
numeros = []


for i in range(10):
    num = int(input())
    numeros.append(num)

quantidade_negativos = 0
soma_positivos = 0

for num in numeros:
    if num < 0:
        quantidade_negativos += 1
    elif num > 0:
        soma_positivos += num

print("Quantidade de números negativos:", quantidade_negativos)
print("Soma dos números positivos:", soma_positivos)
Editor is loading...
Leave a Comment