Friday, January 10, 2014

Basic part-8 | Exception Handling

Hello... Friends, Today we are going to discus about the exceptions Handling in the python. If we talk about Exception that what is Exception ? then i would like to clear that exceptions are the error conditions which stops the normal flow of program. So how we can Handle it ?
if we have some suspicious code that raise an exception, so we can defined our program in a exception handling try & except block


here in this image we can see if we divide 0/0 then it through ZeroDivisionError or intiger division or modulo by zero . So how we can handle it let's see


well we can handle this exception clearly & now if i want to clear more then let's see what are the next


So here we can see all about exception handling in python

Exercise :

1. Study self about "im" method in exception handling. Explore it what happens when we have other exception then zero division error.

No comments:

Post a Comment