Created
November 5, 2016 03:03
-
-
Save Wingless-Archangel/a7274d72cb908ee64f1d1d266b44b29f to your computer and use it in GitHub Desktop.
determine the odd and even number from input
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
#!/usr/bin/python3 | |
import sys | |
def main(): | |
num = input("please enter the number : ") | |
if num.isnumeric() != True: | |
print("Please enter the number") | |
sys.exit(1) | |
if num % 2 == 0: | |
print("this number is even") | |
else: | |
print("this number is odd") | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment