pow() — Easy Examples
Returns base raised to a power, optionally with modulus
Basic pow() usage
Simple demonstration of the pow() built-in function.
python
print(pow(2, 10)) print(pow(2, 10, 1000)) print(pow(3, -1))
pow() is a built-in function that returns base raised to a power, optionally with modulus.
pow() with different inputs
Calling pow() with various argument types.
python
# More pow() examples print("pow() is a Python built-in function") print(f"Type: {type(pow)}")
pow() accepts different types of arguments and produces corresponding results.
Want to try these examples interactively?
Open Easy Playground