Please tell me the code for exponentiation in python 3 project 1 | SoloLearn: Learn to code for FREE!

0

# Please tell me the code for exponentiation in python 3 project 1

I wrote a code but it doesn't execute

11/26/2020 3:42:35 PM

MUKKAMALLA LAVANYA

+5

Show us your code so that we can help you for exponentiation we use ** for example 2**3 = 2×2×2 2**4 = 2×2×2×2

+1

Try writing int before inputting Only numbers could be exponentiated not strings A= int(input(.....

+1

This is what I did. x = 1.000*0.01 *(2**30) y = 0.01 *(2**30) if x>y: print (x) else: print (y) Hope it helps 😊

+1

Thank you harold Peter It helps me

0

A=input('enter num') B=input ('enter num') c=A**B print (c)

0

I wrote in this way

0

Already tried in that way also

0

This worked for me.. Note : Split lines while inputting A=int(input('enter num1 :')) print(A) B=int(input ('enter num2 :')) print(B) c=A**B print(c)

0

0

I just learned this so pow(yourbase, yourexponent, modulus(which is optional)) so pow(2,2) == 4 that might work

0

FOR exponentiation you have to ** just like 2**5 = 32