Runtime error(NZEC) while running Python code

I recently participated in the February long challenge and even tried in the cook-off and the one common issue I faced was getting an NZEC error every time I tried running my python code.
The code ran perfectly well on my laptop(on spyder) and if I tried the test cases given with the question they gave the correct output.
But after that, if I tried it here, I got an error message.
I tried the Non-IDE mode and two of the codes got submitted perfectly well even when they got the NZEC error in the IDE mode.
But even this failed afterward and I wasn’t able to submit anything (in python) after that.

That’s because when you run on the sample input everything works correct but when the online judge runs it on other testcases, errors such as division by zero could occur. If you feel your code is correct, try executing it for such cases.