+ 5
How is >>>7%(5//2) =1
I don't have a good understanding how this does it's calculation.
5 Answers
+ 13
5//2 does a division and excludes the remainder, so 5//2 = 2
So you have 7%2, which does the division but gives as a result the remainder, so 7/2 = 3 and we have a remainder of 1, so 7%(5//2) = 1
Hope this helped.
+ 7
// is the integer division operator, that is, the quotient of the division of two numbers.
% is the remainder of a division.
Because of the (parentheses), you should compute // first.
+ 5
(5//2) = 2 because of floor division
7%2 = 1 because if you divide 7 by 2 the remainder is 1 (modulo operation)
+ 1
Thank you guys.
0
Its simple but something that you really need understand...
* first solve the brackets...which give you
5//2 = 2 not 2.5(because it divides integer And to get exact result to parse this value in Float)
* then, 7%2=1(Remainder) and 3(Quotients)