Question: Task 2B: How Long? [10 Exp] Another interesting question to ask is how long the loan will be completed if you are repaying a certain
![Task 2B: How Long? [10 Exp] Another interesting question to ask](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66ef5eb99ed3a_38566ef5eb92d0e3.jpg)
Task 2B: How Long? [10 Exp] Another interesting question to ask is how long the loan will be completed if you are repaying a certain amount per year. Write a function loan_length(amount, rate, payment) that takes in three inputs: the amount of loan at the start, the annual interest rate, and the yearly payment. We assume that the amount is compounded yearly, at the end of the year. Additionally, we assume that the payment is made at the end of the year. The function returns the number of years until the loan is completely paid. Assumptions amount >= 0 rate >= 0 payment > amount * rate The last assumption states that the loan will always be completely paid. Note You may assume that the function loan_amount_left(amount, rate, payment, year) is already implemented for you correctly based on the assumption above. Example Run >>> loan_length(1000, 6, 100) 16
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
