This table shows the operators we have encountered so far.
Operation | Description | Associativity |
() | parentheses for grouping | left to right |
** | exponentiation | right to left |
+, - | unary + (positive sign), unary - (negative sign) | left to right |
*, /, //, % | multiplication, division, remainder | left to right |
+, - | addition and subtraction | left to right |
in, not in, <, <=, >, >=, !=, == | membership and comparisons | left to right |
not | boolean not | left to right |
and | boolean and | left to right |
or | boolean or | left to right |
ECS 10, Basic Concepts of Computing Fall Quarter 2012 |