+ 1
What's modula and floor division?
What's modula and floor division? Anybody?
2 Antworten
+ 4
By example:
>>> 19/7 # normal
2.714285714...
>>> 19//7 # floor (notice: not rounded)
2
>>> 19%7 # mod
5
+ 2
number A can be written as B*C+D.
A//B is C (D is ignored)
A%B is D (C is ignored)