Created
May 9, 2019 08:32
-
-
Save ItsCosmas/62a16a48721c1087c5798a43b7d3bdc9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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