-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
Financials #5585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Financials #5585
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper
commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper review
to trigger the checks for only added pull request files@algorithms-keeper review-all
to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
financials/interest.py
Outdated
>>> simple_interest(18000,0.06,3) | ||
3240.0 | ||
""" | ||
result = principle * daily_interest_rate * number_of_days_between_payments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result = principle * daily_interest_rate * number_of_days_between_payments | |
return principle * daily_interest_rate * number_of_days_between_payments |
financials/interest.py
Outdated
def simple_interest(principle:float, daily_interest_rate:float, number_of_days_between_payments:int) -> float: | ||
""" | ||
>>> simple_interest(18000,0.06,3) | ||
3240.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add tests dealing with zero principle, negative principle, zero interest rate, negative interest rate, zero days, negative days, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cclauss done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! A nice contribution. Thanks for doing this.
@dhruvmanila How do we fix the single blank line in |
|
||
|
||
def compound_interest( | ||
principle: float, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's
principle: float, | |
principal: float, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both URLs say that you are correct --> #5614
Describe your change:
This Pull request brings calculations for financial. Also creates a 'about file' to make an intro for begginers.
Checklist:
Fixes: #{$ISSUE_NO}
.