Write the output of given python code.
Lakshya Tyagi

Lakshya Tyagi @lakshyatyagi24

Location:
Greater noida, India
Joined:
Sep 1, 2020

Write the output of given python code.

Publish Date: Dec 4 '20
7 5
a=1+2**3*4
print(a)
Enter fullscreen mode Exit fullscreen mode

write your answer in comment with explaination

Comments 5 total

  • Ranjeet Singh
    Ranjeet SinghDec 4, 2020

    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.

  • Jake Varness
    Jake VarnessDec 4, 2020

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

  • Ugbem Job
    Ugbem JobDec 8, 2020

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

  • Sambhav-Jindal-github
    Sambhav-Jindal-githubDec 8, 2020

    33

  • ProMikeCoder2020
    ProMikeCoder2020Dec 9, 2020

    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

Add comment