0
Quotient & Remainder
Print(7%(5//2)) Please explain how you get to your answer
2 Respostas
+ 1
5//2 = 2 (floor division)
7%2 = 1 (modulus division, 1 - remainder)
+ 1
// floor division operator does almost same than / divison operator, but the difference is that floor division always returns a whole number.
% modulus operator performs a floor division, and what was left over by the floor division is the value of modulus.