0
7%(5//2) = ?????
6 Respostas
+ 4
7%(5//2)
% is called 'modulo', which represents the remainder when divided by some numbers.
// is called 'floor division', which represents the quotient.
Look inside the parenthesis first. (5//2) is 2 (quotient) and then 7%(2) equals to 1 (remainder)
So the answer is 1.
Just in case if you confuse = with == ;
= is an assigning operator used to define something while == is an 'equal' operator.
+ 1
5//2==2
7%2==1
0
1
0
it should be 1
0
How does 7%2 = 1 ?
0
A better way for me to Phrase my question is what is the purpose of '7? is it an arbitrary number that can be replaced with 'x' or does it have significance