Created
August 29, 2017 03:56
-
-
Save srahuliitb/70ad007608d4af15a18bb9f129757b13 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.
This file contains hidden or 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
| number = int(raw_input("Enter a number: ")) | |
| if number % 2 == 0: | |
| print (str(number) + " is an even number.") | |
| else: | |
| print (str(number) + " is an odd number.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment