Created
April 30, 2017 17:51
-
-
Save ehedaoo/269e4a71667354636da63a85f9eff6d4 to your computer and use it in GitHub Desktop.
Ask the user for a number. Depending on whether the number is even or odd.
print out an appropriate message to the user.
If the number is a multiple of 4, print out a different message.
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
# Ask the user for a number. Depending on whether the number is even or odd. | |
# print out an appropriate message to the user. | |
# If the number is a multiple of 4, print out a different message. | |
num = int(input("Enter a number: ")) | |
if num % 2 == 0: | |
if num % 4 == 0: | |
print("Your number is a multiple of 4") | |
else: | |
print("Your number is even") | |
else: | |
print("Your number is odd") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment