0
Python Exception Handling
I want to get the exception of ZeroDivisionError: as 'integer division or modulo by zero' but I get as 'division by zero'.How can I get that? can anyone explain?
4 Respostas
+ 1
Print exception message
https://code.sololearn.com/cctomWPdWRLB/?ref=app
0
Can you share that code?
0
a=int(input())
b=[]
for i in range(a):
b.append(list(input().split()))
try:
print(int(int(b[i][0])/int(b[i][1])))
except Exception as e:
print( "Error Code:", e)