+ 4
Python problem (solved)
Why is it showing bigger number? If 2**2**2 shows 16. Then why 2**2**2**2 is 65536 (exected answer is 256)? https://code.sololearn.com/ce3ee0pV05o7/?ref=app
14 Respostas
+ 10
It's similar to this question.
Hope it helps you
https://www.sololearn.com/Discuss/2651824/?ref=app
+ 7
Try this for example
The code will execute right to left rather than left to right cause that's how multiple exponent really works. .
https://code.sololearn.com/cFoecTgkLV91/?ref=app
+ 4
<k>~~~~~~~~~~~~</k>
Understand again
2**2 Means 2 is the power of 2
So here
2**2**(2**2)
2**(2**4)
2**16
#your bigger number
+ 2
you are doing an exponentiation why you gave a large number, try to do 2 * 2 * 2 * 2 that will give the result you want
+ 2
<k>~~~~~~~~~~~~</k>
Check what will be 2**16
+ 2
Check (2**2)#4
Or (2**2**2)#16
Then(2**16)#65536
Which means (2**2**2**2)#65536
+ 1
Simba Thank you so much. I got it😊
+ 1
《 Nicko12 》 Thank you so much. I got it😊
+ 1
Wedad Saleh Nice way to explain.Thank you so much😊
0
I Am AJ ! It is showing 65536
0
print(2**2)#4
print(2**2**2)#16
print(2**16)#65536
print(2**2**2**2)#65536
0
I Am AJ ! Ohh!! Now I understood. Thank you so much😊
0
Andrea Barreto Yes, Now I understood. Thank you so much😊
0
Using (*) two times after a number makes the number after '( ** )' raised to the first number as we write square and cubes in maths, 2^2 = 4,
we get the second number squared as a output.
This code will help you to undewrstand it in a better way.
https://code.sololearn.com/cnUNp5Ahh4jg/?ref=app