0

What does ** mean?

Print (5**5) Gives me 3125 what's is the ** doing?

3rd Sep 2017, 2:51 AM
tyler taft
4 Réponses
+ 8
It's an exponent/power operator. 5**5 = 5 × 5 × 5 × 5 × 5 = 3125
3rd Sep 2017, 2:54 AM
Zephyr Koo
Zephyr Koo - avatar
+ 8
Please refer 9.2.2. Power and logarithmic functions : https://docs.python.org/2/library/math.html
3rd Sep 2017, 4:30 AM
Hatsy Rei
Hatsy Rei - avatar
+ 6
5^5
3rd Sep 2017, 2:54 AM
Enzo
Enzo - avatar
+ 5
5**2; ** will raise power 2 to the 5 i.e. 5^2 = 25
3rd Sep 2017, 3:14 AM
Kartikey Sahu
Kartikey Sahu - avatar