Python Online Compiler
Example: Python Program to Check If a Number is Odd or Even using If-else Statement
C
C++
C#
Java
Python
PHP
main.py
STDIN
Run
# Python Program to Check If a Number is Odd or Even using If-else Statement print ("Enter an integer number to check:\n") x = int (input ()) if (x % 2 == 0): print ("The input number is even.\n") else: print ("The input number is odd.\n")
34
Output
Clear
ADVERTISEMENTS