Uh oh!
There was an error while loading. Please reload this page.
Readable code, function docstring and doctests - #10888
Conversation
cclauss
left a comment
There was a problem hiding this comment.
This is checked on the commit message but these changes do NOT comply.
Please avoid changing both code and tests in a single pull request.
Hardvan
commented
Oct 24, 2023
I have removed the added doctests. Now, there is only one change - the code. |
cclauss
commented
Oct 24, 2023
Great. Please open another pull request with the doctests and we can merge that one before this one. |
Hardvan
commented
Oct 24, 2023
I have opened the PR #10891 which has the added doctests. Thanks! |
cclauss
commented
Oct 24, 2023
OK. Please add the tests that have been merged to |
Hardvan
commented
Oct 24, 2023
Added the tests that have been merged to master. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
for more information, see https://pre-commit.ci
Renamed the variables. |
05d92c0 to
aa93e55Comparefor more information, see https://pre-commit.ci
Uh oh!
There was an error while loading. Please reload this page.
Hardvan
commented
Oct 24, 2023
I'll add the changes tomorrow. Thanks for highlighting the issues. |
Hardvan
commented
Oct 25, 2023
I have added the input validation check for |
Uh oh!
There was an error while loading. Please reload this page.
Hardvan
commented
Oct 25, 2023
I have corrected the algorithm. |
Improved code readability by using separate if-elif statements for conditional checks.
Added inline comments to describe the procedure steps.
Enhanced function documentation for clarity.
Incorporated additional function doctests for thorough testing.
Added Wikipedia reference link for the Fractional Knapsack algorithm.
Checklist: