GUVI
Back

Error in exception handling 

18 Views
1 Comments

GokilaE
GokilaE 2 weeks ago
GokilaE
@GokilaEProfile is locked. Login
def fun(a , b):
    try:
        c = ((a+b) / (a-b))
    except logicError:
        print ("a/b result in 0")
    else:
        print (c)
 
fun(4.0, 6.0)
fun(6.0, 6.0)

in <module>fun(6.0, 6.0)
except logicError:
NameError: name 'logicError' is not defined

I am getting a logicError in that above exception handling program. I need help in this program.

Comments
Please login to comment.
 
Habitate.io