+ 1

print(2**3**2)

Please tell me how to do it....please upvote

10th Jan 2022, 12:11 PM
Fatima Abdul Lateef
Fatima Abdul Lateef - avatar
4 Answers
+ 1
I think it can be simply done by opening your profile and clicking on code bits->click '+'->choose Python and paste it like: print(2**3**2) It will give you the answer, now about talking how to calculate it, haven't you started the Python for beginners? If not, start it soon, it will help you. And the last thing, why you want upvotes?
10th Jan 2022, 1:30 PM
NEZ
NEZ - avatar
+ 5
3ÂČ 2 = 2âč = 512
10th Jan 2022, 12:18 PM
Simba
Simba - avatar
+ 2
calculate from outside to inside 3**2 = 3*3= 9 2**(3**2)= 2**9= 512
10th Jan 2022, 12:20 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 1
Fatima Abdul Lateef The evaluation of the execution happens from right to left. If Python had been lacking this chained-operator feature, I could've achieve a similar result by something like: def chained_pow_op(exp): exp = [*map(int, exp.split("**"))] acc = exp[-1] for x in exp[-2::-1]: acc = x ** acc return acc
10th Jan 2022, 12:36 PM
ƒ ă…€
ƒ ă…€ - avatar