Skip to content

Instantly share code, notes, and snippets.

@GreggX
Created September 12, 2017 17:47
Show Gist options
  • Save GreggX/ec3018556fb9e8e18239b2dab9199ec2 to your computer and use it in GitHub Desktop.
Save GreggX/ec3018556fb9e8e18239b2dab9199ec2 to your computer and use it in GitHub Desktop.
Exercise number 2 of http://www.practicepython.org
while True:
number = int(input("Give me a number: "))
mod = number % 2
## extra 1
multiple_of_four = number % 4
if multiple_of_four == 0:
print("Your number is multiple of four!")
elif mod == 0:
print("Your number is odd!")
else:
print("Your number is even!")
## extra 2
check = int(input("Another number to check: "))
if number == check:
print("Your check number divides evenly into number!")
else:
print("Your check number is different that number!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment