Created
October 19, 2015 07:29
-
-
Save accessnash/981ae200e342737288e9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| """ Exception handling while dividing integers""" | |
| while True: | |
| integer = input("Provide an integer: ") | |
| try: | |
| print(10/int(integer)) | |
| except ValueError: | |
| print("Your input must be an integer") | |
| except ZeroDivisionError: | |
| print("Your input must not be zero") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment