+ 1
Which is performed 1st .. floor division or module
2 Réponses
+ 7
provide your code if any
floor division :
5//2 .. 2
normal :
5/2 .. 2.5
remainder / modulo :
5%2 .. 1
+ 3
It's "modulo", not "module" ^^...
And if you ask about which operator has more priority, don't more ask yourself, and add some parenthesis (rounded brackets) to write explicit proritized expression rather than trust the uncertain behaviour of interpreter ;P
So write: 42 / ( 18 % 11 ) or: ( 42 / 18 ) % 11 rather than: 42 / 18 % 11
Anyway, you can get yourself the answer, by testing all these 3 examples expression, and compare result to see in wich order your interpreter do it ^^