+ 1
The right answer
What is the output of this code? print(int(1+2-3*4/5%6))
4 Antworten
+ 2
Why 0? Why (3*4/5%6) is 3?
+ 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.
+ 1
1
+ 1
I don't understand. Why is 3*4/5%6=3?