Skip to content

Instantly share code, notes, and snippets.

@moulik-source
Created November 6, 2021 14:20
Show Gist options
  • Save moulik-source/0e75fe182b5c263fd79b6b9aea71f943 to your computer and use it in GitHub Desktop.
Save moulik-source/0e75fe182b5c263fd79b6b9aea71f943 to your computer and use it in GitHub Desktop.
odd or even in python
num = int(input("Enter a number: "))
if (num % 2) == 0:
print("{0} is Even".format(num))
else:
print("{0} is Odd".format(num))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment