Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help. I am learning python. Another interesting question to ask is how long the loan will be completed if you are repaying a

image text in transcribed

I need help. I am learning python.

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

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions