Computer Science, asked by 1130708, 4 months ago

State the difference between division and floor division (IN PYTHON)
Answer pls will mark u the brainliest

Answers

Answered by Anonymous
2

Answer:

Floor division, instead of a proper division result returns *the nearest lowest* integer.

17 / 4 = 4.25

17 // 4 = 4

It has to be remembered also for negative numbers:

17 // 4 = 4

17 // -4 = -5 (nearest lowest of -4.25)

-17 // 4 = -5 (same as above)

-17 // -4 = 4

Similar questions