Python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Python

Как в математике считать 2**3**2. Я хочу узнать какая формула тут используется

16th Oct 2021, 2:09 PM
Hlupic
Hlupic - avatar
15 Answers
+ 6
Shiva maybe you should delete the last line of your comment. It is NOT just like (2³)² It's just like 2^(3²) Try it out: # (2^3)^2 = 64 print( (2**3)**2 ) # 64 # 2^(3^2) = 512 print( 2**(3**2) ) # 512 print( 2**3**2 ) # 512
16th Oct 2021, 6:00 PM
Coding Cat
Coding Cat - avatar
+ 2
you mean (2³)² or 2⁹? in the first case enclose the first operation in brackets as I did (e.g. var = (2**3)**2); In the second case enclose the last operation in brackets (e.g. var = 2**(3**2)).
16th Oct 2021, 2:15 PM
Edoardo Blanco
Edoardo Blanco - avatar
+ 1
print(2**3**2) # prints: 512 # this is equal to: # 2^(3^2) or 2^9 #
16th Oct 2021, 2:41 PM
Coding Cat
Coding Cat - avatar
+ 1
Я вас не понимаю, уточните, пожалуйста.
16th Oct 2021, 4:57 PM
CGO!
CGO! - avatar
+ 1
Coding Cat ok and thanks
16th Oct 2021, 6:05 PM
Sagar Yadav
Sagar Yadav - avatar
+ 1
Hlupic Вы ошибаетесь, 2² равно 2 ** 2, 2 × 2 равно 2 * 2, 2 ÷ 2 равно 2/2 для дробного числа, а для целого числа 2 // 2, а остаток от 2 ÷ 2 равен 2% 2.
16th Oct 2021, 6:31 PM
CGO!
CGO! - avatar
+ 1
2**3**5 Let me explain: 2**3**2 = 2**(3**2).............. [3**2 = 3×3 = 9] = 2**9 = 2×2×2×2×2×2×2×2×2 =512 this is your python answer. 💯
18th Oct 2021, 8:47 AM
Shubham Bhatia
Shubham Bhatia - avatar
0
I wonder how this formula is written in mathematics.
16th Oct 2021, 2:19 PM
Hlupic
Hlupic - avatar
0
okay, but when you put the second **, what are you making the power of? the second last one digit or the whole operation since?
16th Oct 2021, 2:29 PM
Edoardo Blanco
Edoardo Blanco - avatar
0
I don't understand it. only understood 2⁵ 2 * 2 * 2 * 2 * 2
16th Oct 2021, 2:37 PM
Hlupic
Hlupic - avatar
0
thanks
16th Oct 2021, 2:52 PM
Hlupic
Hlupic - avatar
0
Does this answer to your question? https://www.sololearn.com/Discuss/2870674/?ref=app
16th Oct 2021, 2:57 PM
Python Learner
Python Learner - avatar
0
К примеру в математике есть формулы 2² это 2*2 Какая формула тогда по правилам математики тут (2**3**2) В коде я понял как это писать, как на бумаги записать этот пример
16th Oct 2021, 5:15 PM
Hlupic
Hlupic - avatar
0
Hlupic 2**3**2 Start solving this type of python problem from right hand side. So,in the first round, python starts solving from right hand side, 3**2 is eqauls to 9 And in second round, 2**9 =512 which mean, 2**3**2 =512 2 ** 3 ** 2 Начните решать эту проблему с питоном с правой стороны. Итак, в первом раунде python начинает решение с правой стороны, 3 ** 2 равно 9 И во втором раунде 2 ** 9 = 512, что означает, 2 ** 3 ** 2 = 512
16th Oct 2021, 5:34 PM
Sagar Yadav
Sagar Yadav - avatar
0
#by using bodmas rule 2**(3**2) ==> 3**2 = 9 2**9=512
16th Oct 2021, 6:57 PM
Jasy Fabiano
Jasy Fabiano - avatar