This PR adds a new operation for computing the exponent to the calculator program. The new operation allows the user to calculate the result of a base raised to the power of an exponent.
Summary of Changes
Added a new function named 'exponent' to the calculator.py file. This function takes two arguments, the base and the exponent, and returns the result of the base raised to the power of the exponent.
Integrated the new exponent operation into the existing calculator function. This involved adding a new option in the menu for the user to choose the exponent operation, and handling this option in the code that processes the user's choice.
Handled the case where the user enters non-numeric values for the base or the exponent, using the same error handling as the other operations.
Updated the menu in the calculator function to display the new option for the exponent operation.
Updated the if clause that checks if the user wants to quit to check for '6' instead of '5'.
Please review and merge this PR. Thank you!
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/add-exponent-operation_2
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 operation for computing the exponent to the calculator program. The new operation allows the user to calculate the result of a base raised to the power of an exponent.
Summary of Changes
Please review and merge this PR. Thank you!
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.