The following code when executed doesn't result in argument( i.e : Divide by Zero is not permitted ) being printed. It only gives built in error message from-
ZeroDivisionError. So, whats the use of user defined arguments when built in error messages are available.
print "Enter the dividend"
print "Enter the divisor"
print "Divide by Zero is not permitted \n ",argument # Argument not getting printed
print "Result=%f" %(result)
The spelling of "ZeroDivisonError" is incorrect and moreover it shouldnt be in "". Correct line:
except ZeroDivisionError,argument: print "Divide by Zero is not permitted \n ",argument