- How mathematical notation is grouped (the parse tree and operator associativity).
- How a programming language (here, Python) tokenizes and parses that notation (including whether it recognizes implicit multiplication).

- 3 × 4 → 12
- 2 + 12 → 14
- Left-associative: (10 − 4) − 3 → 3
- Right-associative: 10 − (4 − 3) → 9

- 8 ÷ 2 → 4
- 4 × 4 → 16
2(2+2) as a single unit (implicit multiplication) — i.e., 8 ÷ [2 × (2 + 2)] → 8 ÷ 8 = 1. Some people (and some calculators or notation styles) treat implicit multiplication — a number adjacent to parentheses — with higher precedence than explicit division, producing the denominator interpretation.

Some calculators and mathematical notation systems give implicit multiplication higher precedence than explicit division, which is why the same written expression can produce different answers in different contexts. This is a notation ambiguity, not an arithmetic mistake.
2(...). Juxtaposition like 2(2 + 2) is parsed as a function call (Python expects the left-hand item to be callable). Therefore:
- If you type the expression with an explicit multiplication operator, Python evaluates it left-to-right for division and multiplication:
- If you omit the
*, Python treats2(2 + 2)as an attempt to call the integer2, which raises a TypeError:

When writing expressions in code, always use an explicit multiplication operator (e.g.,
2 * (2 + 2)) and parentheses to make grouping obvious and avoid parsing ambiguities.- Python operator precedence and associativity: https://docs.python.org/3/reference/expressions.html#operator-precedence
- General notes on implicit multiplication precedence in mathematical notation and calculator behavior (varies by system)