DEV Community

Lakshya Tyagi
Lakshya Tyagi

Posted on

3 3

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

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay