+ 2

I'm very confused about the like 7% (7//5) thing. Not the exact problem but like how to do it exactly and correctly.

4th Mar 2017, 4:48 AM
Lulazy
Lulazy - avatar
4 Answers
+ 7
Do the part in the parenthesis first, so 7 // 5 is 7 / 5 floored, which is 1. Then 7 % 1 means the remainder of 7 / 1, which is 0. So, 7 % (7 // 5) is 0.
4th Mar 2017, 5:06 AM
Samuel Neo
Samuel Neo - avatar
+ 5
4th Mar 2017, 5:04 AM
Patrik Sokol
Patrik Sokol - avatar
+ 5
Please tag the topic well
4th Mar 2017, 5:04 AM
Patrik Sokol
Patrik Sokol - avatar
+ 2
Which language?
4th Mar 2017, 5:03 AM
Samuel Neo
Samuel Neo - avatar