Last active
July 27, 2017 21:04
-
-
Save vihar/78a751cf56aa7e58f0076c30c716876b 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: | |
a = int(input("Enter a negative integer: ")) | |
if a >= 0: | |
raise ValueError("That is not a negative number!") | |
except ValueError as ve: | |
print(ve) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment