check a number is odd or even in python

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

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions or brave browser to block ads. Please support us by disabling these ads blocker.Our website is made possible by displaying Ads hope you whitelist our site. We use very minimal Ads in our site

 

Scroll to Top