Home >>Python math Module >Python math.pow() Method
Python math.pow() method in python is used to returns the first number to the power of the second number in the float to calculate the given power of a base. This method accepts only two number.
Syntax:math.pow(x, y)
Parameter | Description |
---|---|
x | It is required a number to represent the base |
y | It is required a number to represent the exponent |
import math
print(math.pow(5, 8))
import math
a = 4
b = 7
print(math.pow(a,b))
a = 4.3
b = 7.5
print(math.pow(a,b))
a = 2
b = 5
print(math.pow(a,b))
a = 7
b = 0
print(math.pow(a,b))