The common answer is:

`print(2 + 3 * (4 + 8))`

This expression already correctly applies the order of operations, with parentheses ensuring that the addition inside them (`4 + 8`

) is evaluated before being multiplied by `3`

, and finally adding `2`

. Here’s a breakdown:

- The expression inside the parentheses
`4 + 8`

is evaluated first, resulting in`12`

. - Then,
`3`

is multiplied by the result (`12`

), resulting in`36`

. - Finally,
`2`

is added to`36`

, resulting in`38`

.

The output of `print(2 + 3 * (4 + 8))`

will therefore be:

```
38
```

## Leave a comment