DEV Community

loading...

Write the output of given python code.

lakshyatyagi24 profile image Lakshya Tyagi ・1 min read
a=1+2**3*4
print(a)
Enter fullscreen mode Exit fullscreen mode

write your answer in comment with explaination

Discussion (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
Collapse
jobizil profile image
Ugbem Job

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

Forem Open with the Forem app