2**5 how this operation works ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

2**5 how this operation works ?

answer is 32 I don't understand...

6th Oct 2016, 7:17 AM
Kanith Kamal
Kanith Kamal - avatar
8 Answers
+ 2
As you can read in the documentation: https://docs.python.org/2/library/operator.html the ** operator is the power operator. This means 2*2*2*2*2 = 32
6th Oct 2016, 7:22 AM
Zoltán Zörgő
Zoltán Zörgő - avatar
+ 2
2 to the power 5 ie 2×2×2×2×2=32
9th Oct 2016, 6:13 AM
khateeb anwer
khateeb anwer - avatar
+ 1
** stands for power
7th Oct 2016, 7:35 AM
Hritik Shekhar
Hritik Shekhar - avatar
+ 1
2**5 == 2^5 ie 2*2*2*2*2 ie 32
10th Oct 2016, 8:54 PM
vighnesh A
vighnesh A - avatar
+ 1
** will be treated as a power function. Meaning 2^5 in your case which yields 32.
12th Oct 2016, 5:30 PM
Karan Singh
Karan Singh - avatar
0
I is basically telling the computer that you want it to solve a power
6th Oct 2016, 12:25 PM
Hannah
Hannah - avatar
0
it is operator for power insted of using math library
6th Oct 2016, 5:55 PM
Romin Virani
Romin Virani - avatar
0
thank you
23rd Nov 2016, 4:57 PM
Kanith Kamal
Kanith Kamal - avatar