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

LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach

Add your answer:

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