Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Chapter 4 exception handling... error #30

Open
Evrywhere opened this issue Oct 13, 2019 · 1 comment
Open

Chapter 4 exception handling... error #30

Evrywhere opened this issue Oct 13, 2019 · 1 comment

Comments

@Evrywhere
Copy link

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.")

@walperstyle
Copy link

check the spacing on int a vs int b

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants