+ 1

The right answer

What is the output of this code? print(int(1+2-3*4/5%6))

17th Aug 2018, 8:30 AM
chiflado
4 Answers
+ 2
Why 0? Why (3*4/5%6) is 3?
17th Aug 2018, 8:51 AM
chiflado
+ 2
I think, it goes like this: 3 * 4 is 12; 12 / 5 is 2.4; 2.4 % 6 is 2.4; 1 + 2 - 2.4 is 0.6; int(0.6) is 0.
17th Aug 2018, 12:20 PM
HonFu
HonFu - avatar
+ 1
1
17th Aug 2018, 8:36 AM
Dlite
Dlite - avatar
+ 1
I don't understand. Why is 3*4/5%6=3?
17th Aug 2018, 9:35 AM
chiflado