Total Complexity | 4 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """Actualizaciones financieras. |
||
2 | Traer una cantidad de dinero del futuro a un tipo de interes dado.""" |
||
3 | |||
4 | |||
5 | def actualizar_cantidad(amount, rate, pediods): |
||
|
|||
6 | return amount / (1 + rate)**pediods |
||
7 | |||
8 | |||
9 | def actualizar_renta(installment, rate, periods): |
||
10 | amount = 0 |
||
11 | for i in range(1, periods+1): |
||
12 | amount += actualizar_cantidad(installment, rate, i) |
||
13 | return amount |
||
14 | |||
15 | |||
16 | def actualizar_renta_perpetua(installment, rate): |
||
17 | return installment / rate |
||
18 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.