Recursive Power Function

Write a recursive function power(base, exponent) that returns base raised to exponent (a non-negative whole number), using repeated multiplication via recursion rather than Python's ** operator (matching the lesson's own "Apply it" task).

Read base then exponent and print the result.

Example: 2, 5 → 2^5 = 32.

main.py
Loading editor…

Console

Run your code to see output here.