Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python! Task 2: Planning for the Future With selection and repetition statement, you can start planning for your future. In this exercise, we will discuss

image text in transcribedpython!

Task 2: Planning for the Future With selection and repetition statement, you can start planning for your future. In this exercise, we will discuss two important financial plans: loan and retirement. Restrictions You are not allowed to convert any number to any other data type including string. 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 Amount $1000 $960 $917.6 Payment $100 $100 $100 Interest $60 $57.4 $55.06 Amount Left $960 $917.6 872.66 2 3 16 $68.96 $73.10 $4.14 so 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

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

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

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions