Advertisement
ihor_ks

odd_or_even.py

Oct 23rd, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. #!/usr/bin/python3
  2.  
  3. num = int(input("Please enter a number:\n > "))
  4. if (num % 2) == 0:
  5.    print("{0} is even number.".format(num))
  6. else:
  7.    print("{0} is odd number.".format(num))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement