my code unable to pass all testcases
unable to find where i do mistake
Simple input program
Hey @pankajrajput020010, in the question it is given that we have to print the numbers, till the sum of all the numbers is positive. So you don’t have to check for n<=0. Instead you have to check for the whole sum like this
if sum < 0 :
break
else :
print(n)
Try changing to this. Your code should work.
Hope this helps !
Happy Coding 