0
What is the result of this code? >>> 7%(5 // 2)
i dont get it
2 Respuestas
+ 1
5 // 2 is integer/floor division, basically how many 2s go into 5. It goes in twice, so 5 // 2 = 2. Notice the answer must be an integer.
7 % 2 is simply the remainder when 7 is divided by 2. 2 goes in 3 times with remainder 1, so the answer is 1.
0
1.
7%(2)=1