Created
December 21, 2015 05:53
-
-
Save utkarshmalik211/57995e81a333c1233277 to your computer and use it in GitHub Desktop.
Python programme to determine even or odd integer.
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: | |
val1=int(input("Enter a whole no : ")) | |
except ValueError: | |
print("pls enter a whole integer ") | |
except KeyboardInterrupt: | |
print("As your wish") | |
else: | |
if val1 % 2 == 0 : | |
print(val1,"is even.") | |
else: | |
print(val1,"is odd.") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment