0
given a list of numbers stop processing input after the cumulative sum of all the input become negative in python ?
All inputs are integers -1000 and 1000 Print all the numbers before the cumulative sum become nagative
6 odpowiedzi
0
I think i mentioned above what was my question can you see thet
0
Avinash
You need to show your attempts first.
0
Is there any option here to share screen short with you ?
0
s=[]
while True:
n=int(input())
if n<1 or n>1000:
break
else:
s.append(n)
for i in s:
print(i)
0
Input= 1
2
88
-100
49
End expected output is
1
2
88