Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2022 Grenoble France September 19 23 2022 Proceedings Part 4 Lnai 13716

Authors: Massih-Reza Amini ,Stephane Canu ,Asja Fischer ,Tias Guns ,Petra Kralj Novak ,Grigorios Tsoumakas

1st Edition

3031264118, 978-3031264115

More Books

Students also viewed these Databases questions

Question

understand the cohesionperformance relationship,

Answered: 1 week ago