Created
September 12, 2017 17:47
-
-
Save GreggX/ec3018556fb9e8e18239b2dab9199ec2 to your computer and use it in GitHub Desktop.
Exercise number 2 of http://www.practicepython.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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