Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
try:
num = "cos"
num2 = 2
div = num2/num
except ZeroDivisionError:
print("An Error due to zero Division")
except (ValueError, TypeError):
print("An Error occured")
else:
print("The answer is: " + str(div))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment