Fix docstring in present_value.py (#8702)

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss 2023-05-01 02:59:42 +02:00 committed by GitHub
parent c4dcc44dd4
commit f6df26bf0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -363,6 +363,7 @@
## Financial ## Financial
* [Equated Monthly Installments](financial/equated_monthly_installments.py) * [Equated Monthly Installments](financial/equated_monthly_installments.py)
* [Interest](financial/interest.py) * [Interest](financial/interest.py)
* [Present Value](financial/present_value.py)
* [Price Plus Tax](financial/price_plus_tax.py) * [Price Plus Tax](financial/price_plus_tax.py)
## Fractals ## Fractals
@ -655,6 +656,7 @@
* [Sum Of Harmonic Series](maths/sum_of_harmonic_series.py) * [Sum Of Harmonic Series](maths/sum_of_harmonic_series.py)
* [Sumset](maths/sumset.py) * [Sumset](maths/sumset.py)
* [Sylvester Sequence](maths/sylvester_sequence.py) * [Sylvester Sequence](maths/sylvester_sequence.py)
* [Tanh](maths/tanh.py)
* [Test Prime Check](maths/test_prime_check.py) * [Test Prime Check](maths/test_prime_check.py)
* [Trapezoidal Rule](maths/trapezoidal_rule.py) * [Trapezoidal Rule](maths/trapezoidal_rule.py)
* [Triplet Sum](maths/triplet_sum.py) * [Triplet Sum](maths/triplet_sum.py)

View File

@ -6,6 +6,7 @@ An algorithm that calculates the present value of a stream of yearly cash flows
2. An array of cash flows, with the index of the cash flow being the associated year 2. An array of cash flows, with the index of the cash flow being the associated year
Note: This algorithm assumes that cash flows are paid at the end of the specified year Note: This algorithm assumes that cash flows are paid at the end of the specified year
"""
def present_value(discount_rate: float, cash_flows: list[float]) -> float: def present_value(discount_rate: float, cash_flows: list[float]) -> float: