Posts by Lucas Lima • 17 points
1 post
-
0
votes1
answer23
viewsQ: Print only the negatives
lista = [12, -2, 4, 8, 29, 45, 78, 36, -17, 2, 12, 8, 3, 3, -52] for n in lista: if n < 0: soma_dos_negativos = sum(n) print('A soma dos elementos negativos é igual a…
python-3.xasked Lucas Lima 17