Skip to content

Instantly share code, notes, and snippets.

@mightywombat
Last active April 18, 2018 22:25
Show Gist options
  • Save mightywombat/9c7dab0cbb30dfdeb0692034120a6f25 to your computer and use it in GitHub Desktop.
Save mightywombat/9c7dab0cbb30dfdeb0692034120a6f25 to your computer and use it in GitHub Desktop.
practicepython.org Ex 02
# 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