Help me how to understand exponent | Sololearn: Learn to code for FREE!


Help me how to understand exponent

i can't understand that

5/20/2017 3:27:11 PM

yas thas

1 Answer

New Answer


You mean the ** operator? That just means take a number and raise it to a certain power. In regular math you have something like 2^4=16 because 2 factored with itself 4 times is 16. 2*2*2*2=16. In Java to do that, you use Math.pow (2,4). In python you can just use the aforementioned operator. 2**4. That'll give you 16. Edit: there are different ways to achieve exponent operation in python (probably Java too), but the ** is the only one I've used.