Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

exception handling #39

Open
ghost opened this issue Feb 26, 2022 · 0 comments
Open

exception handling #39

ghost opened this issue Feb 26, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 26, 2022

numb1= input("give me a number: ")
numb2=input("give me another number: ")

numb1=int(numb1)
numb2=int(numb2)
try:
print(numb1/numb2)
except (ZeroDivisionError, ValueError):
print("invalid input")

#still failing when strings are entered as input, dont know why. help

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

No branches or pull requests

0 participants