Home >>Python Built-in Functions >Python pow() Function
Python pow() function is used to return the value of x to the power of y i.e. (xy). If a third parameter is present then it returns the x to the power of y modulus z.
Syntax:pow(x, y, z)
Parameter | Description |
---|---|
x | This parameter defines a number that is the base. |
y | This parameter defines a number that is the exponent. |
z | This is an optional parameter. It defines a number that is the modulus. |
x = pow(5, 3)
print(x)
x = pow(5, 3, 10)
print(x)