0

Am New to python trying out some basic python function. Came across exponential In python

2 ** 2 ** 3 is 256

But while in mathematics getting as 64.

3

2 Answers 2

0

Use parentheses. This will give the correct answer.

(2 ** 2) ** 3
1
  • 1
    "correct"? "This will give the answer you expect", maybe Dec 6, 2020 at 14:36
0

Use parentheses

x = (2**2)**3

or:

pow(2,2*3)

Not the answer you're looking for? Browse other questions tagged or ask your own question.