0
hey, explain 7%(5//2) how i got 1?
3 Answers
+ 9
ŠŠ³Š¾Ń ŠŠ¼ŠøŃŃŃŠŗ
5//2 is integer division which returns 2 and remainder is 1
5//2 = 2
Now 7%2 = 1
Remainder is 1 so final answer is 1
+ 1
5/2 does division of 5 by 2 so, it equals 2.5
but 5//2 does integer division so, instead 2.5, it'll give 2
% does modulus division.
7%2 will divide 7 by 2 and give the remainder.
It's 1