Skip to content

Instantly share code, notes, and snippets.

@ehedaoo
Created April 30, 2017 17:49
Show Gist options
  • Save ehedaoo/983dab4ec43690608ca197d9c4d1690a to your computer and use it in GitHub Desktop.
Save ehedaoo/983dab4ec43690608ca197d9c4d1690a to your computer and use it in GitHub Desktop.
Ask the user for a number. Depending on whether the number is even or odd. print out an appropriate message to the user.
# Ask the user for a number. Depending on whether the number is even or odd.
# print out an appropriate message to the user.
num = int(input("Enter a number: "))
if num % 2 == 0:
print("Your number is even")
else:
print("Your number is odd")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment