Easy Tutorial
❮ Python Att Dictionary Popitem Python Os Stat ❯

Python math.pow() Method

Python math Module

The math.pow(x, y) method in Python returns x raised to the power of y.

Syntax

The syntax for the math.pow() method is as follows:

math.pow(x, y)

Parameter Description:

Return Value

Returns a floating-point number representing x raised to the power of y.

Example

The following example returns 9 raised to the power of 3:

Example

# Import math package
import math

# Output 9 raised to the power of 3
print(math.pow(9, 3))

Output result:

729.0

Python math Module

❮ Python Att Dictionary Popitem Python Os Stat ❯