Simple input question

while s>=0:
n=int(input())
s+=n
if s>=0:
print(n)
else: break

It’s still giving error.

Hey @stutijain578, yes it would give an error that s is not defined. Please specify s=0 as the first line of code and then try submitting.

Hope now it doesn’t give any error.
All the best and Happy coding :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.