State the difference between division and floor division (IN PYTHON)
Answer pls will mark u the brainliest
Answers
Answered by
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
English,
2 months ago
Science,
2 months ago
History,
4 months ago
Computer Science,
4 months ago
Psychology,
10 months ago
Computer Science,
10 months ago
English,
10 months ago