WARNING
The poll in the image contains several unstated assumptions. The "correct" (rather than expected) answer is highly language-dependent.
TL;DR
I talk a lot about human #cognitiveBias, as well as the biases inherent to most #AI #datasets. Here's a great human example from one of the LinkedIn #dataAnalytics groups, where the poll author is clearly expecting "512" to be the correct answer but (for some reason) others to get it wrong. However, as I point out, the solution is highly language-dependent, and some of the "correct" answers are 791 and 6,561.
An effective #CIO, #CISO, or #CDO needs to keep these implicit biases in mind to avoid falling into traps like this one. Read on if you want to understand how easily the jaws of the trap can close!
Analysis
The order of operations will depend on both operator precedence and parsing rules. In many languages this ambiguous expression has an expected result of 512, but if sub-expressions with equal precedence aren't evaluated right-to-left then you may get a very different answer. Parenthesizing makes the expression less ambiguous: 2 ** (3 ** 2) #=> 512
. Other parsers may result in (2 ** 3) ** 2 #=> 64
if power operators retain equal precedence but sub-expressions are evaluated in a different order.
The problem with the question as posed is that it looks like a math question, but it's actually a language-dependent programming question. Not everyone doing analytics or programmatic math is using the Python or Ruby languages, which have well-defined behavior for this use case.
Other Languages
The expr command in TCL 8.6.15 and the math command in Fish 3.7.1 will interpret the non-parenthesized expression left-to-right, resulting in 6561. For these languages, you need to changes not only the precedence of expressions but also the type or order of the expressions. For example, these will both yield he expected result of 512 in TCL: expr (2 ** 3) ** 3
or expr "2 ** (3 ** 2)"
. Your mileage will vary by language.