Created
May 9, 2019 08:29
-
-
Save ItsCosmas/f1b5045b8daaba52da06b730c03b21b3 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 = "text" | |
num2 = 2 | |
ans = num2/num | |
except TypeError: | |
print("An Error occured: You cannot perfom division on a string.") | |
else: | |
print("The answer is: " + str(ans)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment