Guy what is the answer and please explaine it to me. thanks | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Guy what is the answer and please explaine it to me. thanks

7%(5//2)

16th Mar 2018, 9:01 PM
Ivan Yovev
Ivan Yovev - avatar
2 Answers
+ 12
// is floor division. It'll consider only the integer part of the result. For example, if the quotient is 4.3, the // will give you 4. So 5//2 = 2 (integer part of 2.5) % is remainder. When we divide 6 by 4, the quotient is 1 and remainder is 2. 7%(5//2) = 7%2 = 1 (1 remains after division)
16th Mar 2018, 9:09 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 3
thx
16th Mar 2018, 9:10 PM
Ivan Yovev
Ivan Yovev - avatar