0

Don't understand this.....new to programming and it getting me pissed off

>>> 20 // 6 3 >>> 1.25 % 0.5 0.25

4th Jul 2018, 7:22 AM
Kingbevis
1 ответ
+ 5
20 // 6 is dividing 20 with 6. however this is integer division so it only sees how many times the integer 6 fits within 20, which is 3. 1.25 % 0.5 returns the remainder when dividing the two numbers. 1.25 / 0.5 = 2 + 0.25, so the answer is 0.25.
4th Jul 2018, 7:28 AM
hinanawi
hinanawi - avatar