Test case 3 failing

My code of programm simple input is failing for test case 3 , don’t know why, please if you can check the problem
code link: https://drive.google.com/file/d/1KObJ_aRUC4Vz1UBKyMRJqw67UXmXIy6y/view?usp=sharing

Hey @saksham_thukral, as far as I can see your code is going into an infinite loop. In this question, you simply have to take the input till the time the sum remains positive and then as soon as you encounter a number due to which the sum becomes negative, you need to break. In your code what is the condition which stops taking input from the user ? I don’t think there is any.

Just try to simple take input without involving try , except block. You would easily be able to solve this !

I hope this helps !
Happy Learning :slight_smile: