This PR adds a new function to calculate the exponent of two numbers and integrates it into the existing calculator function. The new exponent function takes two arguments, the base and the exponent, and returns the result of the base raised to the power of the exponent. The calculator function has been updated to include a new operation choice for exponentiation and handles the user's choice to perform the exponent operation.
Summary of Changes
Added a new function named 'exponent' to calculate the exponent of two numbers.
Integrated the new exponent function into the existing calculator function.
Added a new operation choice for exponentiation in the calculator menu.
Handled the user's choice to perform the exponent operation and displayed the result.
Updated the range of valid choices in the user prompt.
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/add-exponent-function_1
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.
Description
This PR adds a new function to calculate the exponent of two numbers and integrates it into the existing calculator function. The new exponent function takes two arguments, the base and the exponent, and returns the result of the base raised to the power of the exponent. The calculator function has been updated to include a new operation choice for exponentiation and handles the user's choice to perform the exponent operation.
Summary of Changes
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.