answersLogoWhite

0

Floor division is division where the answer is rounded down. For example, 5/2 in floor division is not 2.5, but 2. In Python 2, floor division is the default. In Python 3, the floor division operator is //.

Python 2:

>>> 5/2

2

>>> 5.0/2

2.5

Python 3:

>>> 5/2

2.5

>>> 5//2

2

User Avatar

Wiki User

13y ago

Still curious? Ask our experts.

Chat with our AI personalities

ReneRene
Change my mind. I dare you.
Chat with Rene
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake

Add your answer:

Earn +20 pts
Q: What is floor division in Python?
Write your answer...
Submit
Still have questions?
magnify glass
imp