What is the result of this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the result of this code?

>>>7%(5//2)

27th Oct 2018, 8:20 AM
Vivek Rajliwal
Vivek Rajliwal - avatar
2 Answers
+ 2
5//2 results in 2 // is floor division. it returns an integer always. 5/2=2.5 and 5//2=2 6//2= 3 and 6//2=3 '//' is equivalent to '/' and greatest integer function 7%2 will now return 1 as it is the remainder when you divide 7 by 2
27th Oct 2018, 8:33 AM
Megatron
Megatron - avatar
0
you are the biggest idiot in the world bro
29th Oct 2020, 1:05 PM
ansar 123
ansar 123 - avatar