← Back to challenges

To the Power of _____

PythonMediumlogicloopsmathnumbers

Instructions

Create a function that takes a base number and an exponent number and returns the calculation.

Examples

calculate_exponent(5, 5) ➞ 3125

calculate_exponent(10, 10) ➞ 10000000000

calculate_exponent(3, 3) ➞ 27

Notes

  • All test inputs will be positive integers.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.