+ 1

# Help me how to understand exponent

i can't understand that

1 Answer

+ 3

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.

Hot today

Please help me with HTML

1 Votes

What is the mistake here?

3 Votes

Unable to overload +

2 Votes

Hey! [SOLVED]

0 Votes

Pls rectify the errors.

1 Votes