How is 7 (5//2) 1? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How is 7 (5//2) 1?

7 (5//2)

29th Jul 2017, 1:44 AM
Carson Feng
Carson Feng - avatar
3 Answers
+ 7
Do you mean "how 7 % (5 // 2) = 1"?
29th Jul 2017, 3:20 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 1
The answer is simply because the result of 5 / 2 = 2.5 so quotient is 2 and remainder is 1 but operation is 5 // 2 so we need only the quotient = 2. The rewrite will become : 7 % (2) Which is 7 / 2 = 3.5 the quotient is 3 and remainder is 1, but the operation 7%2 only asks about the remainder = 1
31st Jul 2017, 11:42 AM
khalid
0
i think 7 * (5//2) = 1
29th Jul 2017, 6:18 AM
Domces Games
Domces Games - avatar