pow(a,b)
mathematical function in python is used to calculate the value ab.
The syntax of the pow()
mathematical function is given below:
pow(a,b)
a
and b
are numeric value passed as a parameter. math
module in order to access the ceil()
function as
this function is not directly available.
This mathematical function returns the value of ab
.
#name of the file: pow.py
#import the math module
import math
#pow() on float value
print("math.pow(2.9,5) = ", math.pow(2.9,5))
#pow() on int value
print("math.pow(2,5) = ", math.pow(2,5))
>python pow.py
math.pow(2.9,5) = 205.11148999999997
math.pow(2,5) = 32.0