Programming
Python
R
Java
C
C++
C#
WEB
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
MORE
Examples1
Python
GO
R
Java
C
C++
C#
Examples2
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Seo Tools
Code Minifier
Code Beautifier
Language Compiler
Misc Tools
File Converter
References
C
C++
Python
Java
PHP
JavaScript
Examples
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Home
About
Contact
JetPack
Multi Themes-->>
Code it ALL
Scroll TOP
Python Program to Check if a Number is Odd or Even - CodeGK
Δ Python Examples
Examples
Python Program to Print Hello world!
Python Program to Add Two Numbers
Python Program to Find the Square Root
Python Program to Calculate the Area of a Triangle
Python Program to Solve Quadratic Equation
Python Program to Swap Two Variables
Python Program to Generate a Random Number
Python Program to Convert Kilometers to Miles
Python Program to Convert Miles to Kilometers
Python Program to Convert Celsius To Fahrenheit
Python Program to Convert Fahrenheit To Celsius
Python Program to Check if a Number is Odd or Even
♦ Python Program to Check if a Number is Odd or Even
♣ Example1: Python Program to Check if a Number is Odd or Even
Input:
Run CODE
Reload Code
Copy Code
# 0 for Even, 1 for Odd def checkOddEven(number): if(number%2==0): print(number," is Even") return 0 if(number%2==1): print(number," is Odd") return 1 num1=6 checkOddEven(num1) num2=5 checkOddEven(num2) num3=78 checkOddEven(num3)
Output: