+ 2
Where do floor division // and modulo % operators fit in with PEMDAS?
PEMDAS (Parenthesis, Exponentation, Moltiplication, Division, Addition, Subtraction) is the order in which mathematical expressions are to be evaluated. I'm not sure which is the right place for // and % in the above-mentioned list.
3 Respuestas
+ 12
Think about what each does. For example, modulo is DIVIDING and taking the remainder. Thus, it has the same importance and order as multiplication and division. I think you can figure out the other one. 😎
+ 11
very helpful
+ 3
Floor division (//)and modulo (%) are nowhere in practical mathematics where PEMDAS rule is applied. It is (// and %) only present in coding. That's why they are not present in the rule.