Getting EOF error

sum=0
lst=[]
while True:
l=input()
n=int(l)
sum=sum+n
if(sum<0):
break
else:
lst.append(n)
for x in lst:
print(x)

@Anshuman-Behera-1168641663271515
I simply tried running your code after arranging the proper indentation. It worked and got a full score. Try once again and share your code using ide.codingblocks.com if doesn’t work. Do not copy-paste codes here as you know indentation is extremely important in python , something that is lost when you simply paste your code here.

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.