This PR adds a new operation to the calculator program for computing the exponent of a number. The new operation is implemented as a function named exponent in the calculator.py file. The function takes two arguments, base and exponent, and returns the result of base raised to the power of exponent. The exponent operation is added as an option in the calculator's interactive menu, and the operation is performed when the user selects this option.
Summary of Changes
Added a new function named exponent in the calculator.py file to compute the exponent of a number.
Modified the calculator function to include the new exponent operation in the interactive menu.
Handled the user's selection of the new exponent operation in the calculator function.
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 to the calculator program for computing the exponent of a number. The new operation is implemented as a function named
exponent
in thecalculator.py
file. The function takes two arguments,base
andexponent
, and returns the result ofbase
raised to the power ofexponent
. Theexponent
operation is added as an option in the calculator's interactive menu, and the operation is performed when the user selects this option.Summary of Changes
exponent
in thecalculator.py
file to compute the exponent of a number.calculator
function to include the newexponent
operation in the interactive menu.exponent
operation in thecalculator
function.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: