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

7%(5//2)

What will the answer of it and how?

27th May 2019, 6:54 PM
Asif
Asif - avatar
2 Answers
+ 4
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.
27th May 2019, 6:58 PM
Bodan Talev
Bodan Talev - avatar