Skip to content

Instantly share code, notes, and snippets.

@utkarshmalik211
Created December 21, 2015 05:53
Show Gist options
  • Save utkarshmalik211/57995e81a333c1233277 to your computer and use it in GitHub Desktop.
Save utkarshmalik211/57995e81a333c1233277 to your computer and use it in GitHub Desktop.
Python programme to determine even or odd integer.
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