0

why is 7% (5//2)=1

7th Aug 2016, 1:57 PM
harshithakamjula
harshithakamjula - avatar
4 Respuestas
+ 7
// is the integer division operator, which basically means it rounds decimals down to the nearest whole number. So 5//2 equals 2 Then % is the modulo operator, which just returned the remainder from dividing two numbers. In this case the remainder of 7/2 is 1
7th Aug 2016, 2:10 PM
Spencer
Spencer - avatar
+ 1
the // is a truncating division operator which rounds down your integer division answer to integer without float and then 7%2 is 1
7th Aug 2016, 3:19 PM
aman maurya
aman maurya - avatar
0
1
8th Aug 2016, 9:06 PM
issack
0
Roger that
9th Aug 2016, 4:33 AM
Ammar Abubakar
Ammar Abubakar - avatar