Thursday, 9 August 2018

Why do we use Exception Handling in Python? tccicomputercoaching.com

Exception is an error that happens during execution of a program. It can be said to be any abnormal condition in a program resulting to the disruption in the flow of the program.

Whenever an exception occurs the program halts the execution and thus further code is not executed.

Thus exception is that error which python script is unable to tackle with.

Exception in a code can also be handled. In case it is not handled, then the code is not executed further and hence execution stops when exception occurs.

Why do we use Exception Handling ?

Error handling refers to the anticipation, detection, and resolution of programming, application, and communications errors. Specialized programs, called error handlers, are available for some applications.

The error handling is done through the use of exceptions that are caught in try blocks and handled in except blocks. If an error is encountered , a try block code execution is stopped and control is transferred to the except block.

To know more in detail about Exception Handling in Python .

TCCI computer coaching is located in Bopal and satellite in Ahmedabad. We provide coaching for all Engineering Branch and all University course.

Call us @ 98256 18292
Visit us @http://tccicomputercoaching.com/

No comments:

Post a Comment