+ 2

What is the output of this code??

Print (2**1**4**2)

2nd Oct 2019, 2:11 PM
roza alandalib
roza alandalib - avatar
5 Réponses
+ 3
The exponentiation is performed right-to left. 2**1**4**2 is actually 2**(1**(4**2)) = 2**(1**16) = 2**1 = 2
2nd Oct 2019, 3:03 PM
Kishalaya Saha
Kishalaya Saha - avatar
+ 2
Oh I understand this point now Thank u so much
2nd Oct 2019, 3:06 PM
roza alandalib
roza alandalib - avatar
+ 1
How to get this result is 2
2nd Oct 2019, 2:11 PM
roza alandalib
roza alandalib - avatar
0
You're welcome, roza alandalib 😊
2nd Oct 2019, 3:15 PM
Kishalaya Saha
Kishalaya Saha - avatar
0
First write this program properly and it's output will be 2.
2nd Oct 2019, 6:12 PM
Pushpendra Singh
Pushpendra Singh - avatar