DEV Community

Lakshya Tyagi
Lakshya Tyagi

Posted on

Write the output of given python code.

a=1+2**3*4
print(a)
Enter fullscreen mode Exit fullscreen mode

write your answer in comment with explaination

Top comments (5)

Collapse
 
jvarness profile image
Jake Varness

1+2**3*4=1+8*4=1+32=33

Collapse
 
techonerd profile image
Ranjeet Singh

the output will be 33. 2*3 is like 2*2*2 . The number post * is number of time first number should be repeated with * operation.

Collapse
 
promikecoder2020 profile image
ProMikeCoder2020

Since we do to the power of first, multiplication second and finally sum it goes like this: 1+ 2 ** 3*4 = 1 +8*4 = 1 +32=33

Collapse
 
sambhavjindalgithub profile image
Sambhav-Jindal-github

33

Collapse
 
jobizil profile image
Ugbem Job

a=1+2*3*4
=> 1+(2
*3)*4
=>1+(8)*4
=>1+32
=>33
a=33