Check a number is odd or even in python

Introduction

In this post, you will learn how to check a number that is odd or even in python and below is the source and also below is the video format of the post, have any doubt watch the video or comment down below.

Video

Check a number is odd or even

To check a number is odd or even, you need to know about ????????

  1. if else
  2. Data types
  3. Operator

Here, I have entered the variable num and asked the user to enter the input value and the entered the if statement and if divided by 2, I have printed as even else I have print odd.

Below is the output of the program.

Check a number is odd or even

Also Read: Heads or tails in python full tutorial

Also Read: Check a number is positive, negative or zero in python