Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started