pow()
Learn how to use the pow() function to calculate the base raised to the power of the exponent.
Returns a result of raising to power
Syntax
pow(base, exponent )
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| base | int, real, or long | ✔️ | The base value. |
| exponent | int, real, or long | ✔️ | The exponent value. |
Returns
Returns base raised to the power exponent: base ^ exponent.
Example
print result=pow(2, 3)
Output
| result |
|---|
| 8 |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.