This PR adds a new operation for computing the exponent to the calculator program. The exponent operation raises a base number 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, base and exponent, and returns the result of base raised to the power of exponent.
Modified the calculator function to include a new option for the exponent operation in the user menu.
Implemented the handling of the exponent operation in the calculator function. When the user selects the exponent operation, the exponent function is called with the user-provided numbers, and the result is printed in the same format as the other operations.
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
🎉 Latest improvements to Sweep:
Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
We released a demo of our chunker, where you can find the corresponding blog and code.
💡 To get Sweep to edit this pull request, you can:
Leave a comment below to get Sweep to edit the entire PR
Leave a comment in the code will only modify the file
Edit the original issue to get Sweep to recreate the PR from scratch
Description
This PR adds a new operation for computing the exponent to the calculator program. The exponent operation raises a base number to the power of an exponent.
Summary of Changes
exponent
to thecalculator.py
file. This function takes two arguments,base
andexponent
, and returns the result ofbase
raised to the power ofexponent
.calculator
function to include a new option for the exponent operation in the user menu.calculator
function. When the user selects the exponent operation, theexponent
function is called with the user-provided numbers, and the result is printed in the same format as the other operations.Please review and merge this PR. Thank you!
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: