Last active
April 18, 2018 22:25
-
-
Save mightywombat/9c7dab0cbb30dfdeb0692034120a6f25 to your computer and use it in GitHub Desktop.
practicepython.org Ex 02
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
# practicepython.org Ex 02 | |
num = int(raw_input ( "Enter a number you would like divided: " )) | |
check = int(raw_input ( "Enter a number you want to divide by: ")) | |
rem = str( num % check ) | |
divby2 = num % 2 | |
if divby2 == 0: | |
print ( str(num) + " is EVEN." ) | |
else: | |
print ( str(num) + " is ODD." ) | |
print ("If you divided " + str(num) + " by " + str(check) + " you would have " + rem + " left over." ) | |
if ( num % check ) == 0: | |
print ( "That's because " + str(num) + " is a multiple of " + str(check) + "." ) | |
else: | |
print ( "That's because " + str(num) + " is NOT a multiple of " + str(check) + "." ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment