Objective
Create a Python program with a function called calculate_power() that calculates the result of raising an integer to the power of another integer.
Instructions
- In the
mainfunction, ask the user for two integers. - Implement the function
calculate_power()with both integers as parameters. It returns the first number raised to the power of the second one. - Print the result of the calculation.
2
3
Result: 8
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise