This PR adds a new exponent function to the calculator program and integrates it into the existing calculator function. The exponent function takes two arguments, base and 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 option for the exponent operation in the menu that the user sees. When the user selects the exponent option, the program calls the exponent function with the user-provided numbers and displays the result.
Summary of Changes
Added a new function, exponent, to the calculator.py file
Integrated the exponent function into the calculator function
Updated the menu in the calculator function to include the exponent option
Handled the exponent option in the code that processes the user's choice
Displayed the result of the exponent operation in the same format as the other operations
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 exponent function to the calculator program and integrates it into the existing calculator function. The exponent function takes two arguments, base and 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 option for the exponent operation in the menu that the user sees. When the user selects the exponent option, the program calls the exponent function with the user-provided numbers and displays the result.
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.