You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried running this code and I think I am not supposed to get the error instead it
prints "b can not be zero". This is the code:
a=input("type a number:")
b=input("type anothernumber")
a=int (a)
b=int(b)
try:
print (a/b)
except ZeroDivsionError:
print("b cannot be zero.")
The text was updated successfully, but these errors were encountered:
I tried running this code and I think I am not supposed to get the error instead it
prints "b can not be zero". This is the code:
a=input("type a number:")
b=input("type anothernumber")
a=int (a)
b=int(b)
try:
print (a/b)
except ZeroDivsionError:
print("b cannot be zero.")
The text was updated successfully, but these errors were encountered: