Message390217
The Division (/) section example uses the commented variable "result" without it being defined. I am counting 4 numbers, (5.6667, 5, 2, 17), that are called result. The correct result can be implied but its poor documentation. So, either change:
>>> 17 // 3 # floor division discards the fractional part
to
>>> result = 17 // 3 # floor division discards the fractional part
or change:
>>> 5 * 3 + 2 # result * divisor + remainder
to
>>> 5 * 3 + 2 # floor * divisor + remainder
I suggest the latter as it explains the formula for floor. |
|
Date |
User |
Action |
Args |
2021-04-04 23:44:25 | thomaspcavalli | set | recipients:
+ thomaspcavalli, docs@python |
2021-04-04 23:44:25 | thomaspcavalli | set | messageid: <1617579865.45.0.541169648182.issue43729@roundup.psfhosted.org> |
2021-04-04 23:44:25 | thomaspcavalli | link | issue43729 messages |
2021-04-04 23:44:24 | thomaspcavalli | create | |
|