+ 2

Why 7**7**1000 is not working?

I wrote this code, when I wrote (7**7)**1000 it was right but If i wrote 7**7**1000 it is not work ing again It also doesn't say that it is an error..

17th Mar 2019, 6:12 AM
Jahin Mahruf
Jahin Mahruf - avatar
9 Respostas
+ 13
The right to left thing comes from mathematics, there powers are done right to left aswell. The problem is just that 7**7**1000 is so mindboggingly large and you need so so much time to compute it. Try print(7**1000) and look at that number. 7**7**1000 has that many *digits*.
17th Mar 2019, 7:00 AM
Schindlabua
Schindlabua - avatar
+ 7
It seems that exponation is evaluated from right to left, so the second expression would be 7**(7**1000). I looked up online, but I couldn’t find anything, sorry. Better leave it to the Python expert, Kuba Siekierzyński.
17th Mar 2019, 6:32 AM
Rowsej
Rowsej - avatar
+ 5
What do you get for (7**7)**1000, and what do you get for 7**7**1000?
17th Mar 2019, 6:21 AM
Rowsej
Rowsej - avatar
+ 5
Hmm... I’ll look into that. Be back in 5 mins or so.
17th Mar 2019, 6:26 AM
Rowsej
Rowsej - avatar
+ 3
1.Input : >>> (7**7)**1000 It outputs a huge number. 2. Input : >>> 7**7**1000 It outputs nothing and it also doesn't say it error...it just shows nothing..(I am using Qpython3)
17th Mar 2019, 6:25 AM
Jahin Mahruf
Jahin Mahruf - avatar
0
Just because if you don't use the brackets it will not understand that which value of power it should calculate first and if you use brackets it will calculate the one in bracket firstly and then the others.
24th Mar 2019, 2:52 PM
Ayush
0
Hi
8th Apr 2019, 7:07 PM
Metall Another
Metall Another - avatar
0
who knows Russian or Ukrainian
8th Apr 2019, 7:08 PM
Metall Another
Metall Another - avatar
0
then for 7**7 we are not indicating the brackets na, but it's working, how??
21st Apr 2019, 4:13 PM
karishma P.K.B
karishma P.K.B - avatar