- 1
If you introduce a float into the equation, even if the answer is a whole number, it will still be a float. 4-2=2 .. 4.0-2=2.0.. also, / always results in a float because it gets a "reasonable approximation" of // which results in "True division" and discards the fractional part example: output: print(4.0+2) - 2.0 print(4-2) - 2 print(4*2) - 8 print(4/2) - 2.0 print(4+2) - 6 print(4//2) - 2
22nd Apr 2017, 7:14 PM
LordHill
LordHill - avatar