+ 1
How floor division different from division
3 Answers
+ 1
Floor function is greatest integer less than or equal to a number...
Modulo function yields remainder....
Hope it helps...Cheers...
0
import math
x=13
y=4
print(x/y)
print(math.floor(x/y))
Running this will show you the difference. basically, division divides the numbers resulting in 3.25.. floor division also gets 3.25 but returns the "floor".. simply 3.. floor isn't round however.. floor(3.99) doesn't round to 4.. it goes down to the floor. floor(3.99) is 3 also