0
7%(5 // 2)
4 Answers
+ 3
So what is the question?You can simply run it in solo playground and check the answer
+ 4
Then you should mention in the question that you need an explanation for it ,
// is floor division ,5//2 results in 2.5 which evaluates to 2
now in 7%2, "%" returns remainder ,so after division you get remainder as 1
+ 4
Bhawna Singla it's just basic maths. Things inside the brackets will be evaluated first(because of highest precedence) so (5//2=2)
And then 7%2 = 1.
If you don't know how modulo operator ("%") work then it just divides the numbers and return the remainder.
+ 1
@abhay i want explanation of this ques