Skip to content

Instantly share code, notes, and snippets.

@benslv
Created September 7, 2018 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benslv/c301eafb26750e33c84da68b971dc32e to your computer and use it in GitHub Desktop.
Save benslv/c301eafb26750e33c84da68b971dc32e to your computer and use it in GitHub Desktop.
2. Odd or Even
inpNumber = int(input("Please enter a number: "))
if inpNumber % 4 == 0:
print("This number is divisible by 4.")
elif inpNumber % 2 == 0:
print("This number is even!")
else:
print("This number is odd.")
num = int(input("Please enter another number: "))
check = int(input("One more, go on... "))
if num % check == 0:
print("Yay!, "+str(num)+" is divisible by "+str(check)+".")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment