How do one formulate a correct response according to the test case?

Ik that this code works but it is not showing positive results with the given test case.

total =0
a = []
n = int(input("Enter no of elements: "))
for i in range(0,n):
ele1 = int(input())

a.append(ele1)

print(a)

for ele in range(0,len(a)):
total = total + a[ele]
if total > 0:
print(total)

Hi @dikshant9sharma

s=0
while(1):
		n=int(input())
		if(s+n<0):
			break
		print(n)
		s=s+n 

please refer the following code

Hope this might helps :slightly_smiling_face:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.