• The division operator in python is used to perform the division operations.
  • It divides the left-side values with the right-side value and gives the remainder.
  • In other languages, we have only one division operator but in python, we have 2 division operators.
  1. division.
  2. floor division.
 1.Division: In division when we divide values we get the result in floating type.
It is denoted by the symbol "/".

Example: write a python code for integers using a division operator.

  1. x=20
  2. y=4
  3. print(x/y)

2.floor division(//):  In the floor division when we divide the values we get the whole number only.
It is denoted by the symbol "//".

Example: write a python program for integer values using floor division.

  1. x=20
  2. y=4
  3. print(x//y)
output: 5

Instance Of Java

We will help you in learning.Please leave your comments and suggestions in comment section. if you any doubts please use search box provided right side. Search there for answers thank you.
Newer Post
Older Post

No comments

Leave a Reply

Select Menu