0

7%(5//2)

What will the answer of it and how?

5/27/2019 6:54:14 PM

Asif

2 Answers

New Answer

+2

Firstly, (5//2) is calculated which gives us an integer value of the division i.e. how many times does 2 go into 5, which is 2. Then the modulo operator (%) gives us the remainder of dividing 7 with 2 which is 1 [7/2=3+(1)], thus the answer is 1.

+2

about //: https://stackoverflow.com/questions/183853/what-is-the-difference-between-and-when-used-for-division