Skip to content

Instantly share code, notes, and snippets.

@dhavalsavalia
Created August 5, 2017 23:14
Show Gist options
  • Save dhavalsavalia/7ca7e2b1004202bfa4c450891ce7286c to your computer and use it in GitHub Desktop.
Save dhavalsavalia/7ca7e2b1004202bfa4c450891ce7286c to your computer and use it in GitHub Desktop.
practicepython-exercise-two | Odd Or Even
# asking for a number
number = int(input("Enter a number: "))
# checking with if
if number % 2 == 0:
print("Number {} is even!".format(number))
else:
print("Number {} is odd!".format(number))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment