Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

I need to code using PYTHON Question 4: Task 2A: Loan View Past Answers No past answers. Task 2A: Loan [20 Exp] When you take

image text in transcribedI need to code using PYTHON

Question 4: Task 2A: Loan View Past Answers No past answers. Task 2A: Loan [20 Exp] When you take a loan from a bank, they will charge an interest based on the amount of the loan. When you repay the loan yearly, the accrued interest based on the initial amount would be deducted from the repayment and the remainder would be used to repay the loan. Year Interest $60 Amount $1000 $960 $917.4 Payment $100 $100 $100 Amount Left $960 $917.4 872.46 2 $57.4 $55.06 16 $68.96 $73.10 $4.14 $0 In this example, you took a loan of $1000 with interest rate of 6% per annum compounded yearly. You decide to repay $100 dollars per year. In the first year, the interest of $60 dollars would be deducted from your repayment. The remaining $40 would be deducted from his loan and the current amount you must pay back is $960. The calculations for the subsequent years are shown on the table above. Write a function loan_amount_left(amount, rate, payment, year) that takes in four inputs: the amount of loan at the start, the annual interest rate, the yearly payment, and the number of years. We assume that the amount is compounded yearly, at the end of the year, after interest is added. Additionally, we assume that the payment is made at the end of the year. The function returns the amount of loan left at the end of the given year. Edit: The value in yellow was previously $917.6, it should be as it is now $917.4. The value in red was previously $872.66, it should be as it is now $872.46. The test cases were not affected in any way. Assumptions

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

Question

what output in c++ code? and explain

Answered: 1 week ago