Python Floor Division Operator
In Python, Arithmetic Floor Division Operator takes two operands and returns the quotient of the integer division of first operand by the second operand.
Syntax
The syntax to find the quotient in the integer division of two numbers: a
and b
using Floor Division Operator is
</>
Copy
a // b
The above expression returns a number.
Example
In the following program, we take two numbers: a, b; and find the quotient of their integer division a / b
.
main.py
</>
Copy
a = 6
b = 4
result = a // b
print(result)
Output
1
Conclusion
In this Python Tutorial, we learned about Arithmetic Floor Division Operator, its syntax, and usage, with examples.