Python Program to Calculate Power of a Number
In this example, you will learn to compute the power of a number using exponentiation(**) operator.
base=10 exp=3 result=base**exp print("Result : ",result)
Result : 1000
The exponentiation(**) operator used to get the power of a number. Syntax as follows,
- x is the base
- y is the power
we can, raise the power(y) of base(x) using exponentiation(**) operator.