Quotient & Remainder in python
|
|
| Quotient & Remainder in python |
Floor division is done using two forward slashes and is used to determine the quotient of a division. Wait! What?! "Floor Division"? "Quotient"?
Quotient just means the quantity produced by the division of two numbers.
And Floor division is just like a normal division operation except that it returns the largest possible integer. This integer is either less than or equal to the normal division result.
For example:
The code above will output 3, because 6 goes into 20 three times, and is the largest possible integer.
You can also use floor division on floats, and the result will always be a float.