Write a function loan amount left

Assignment Help Programming Languages
Reference no: EM132446945

Assignment Question -

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

Payment

Interest

Amount Left

1

$1000

$100

$60

$960

2

$960

$100

$57.6

$917.6

3

$917.6

$100

$55.06

$872.66

...

...

...

...

...

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.

Reference no: EM132446945

Questions Cloud

What are the consequences of the practices on the firm : When you learn of your coworker's actions, what is your response? What are the consequences of these practices on your firm?
What were the repercussions of the unethical actions : What were the repercussions of the unethical actions? What would have been the ethical response? financial investigators that crossed the line of ethics
Evaluate trends in the performance of P Jason Corporation : As the loan officer, what else would you do to gain a better understanding of Paul Jason's, and the Corporation's financial picture and why?
How would you improve internal controls of companies : The auditor identified a material misstatement in the financial statements that was not detected by management of the company.
Write a function loan amount left : 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
Why service companies are more sensitive to labor : Examine the main reasons why service companies are more sensitive to labor and price variances, as compared to material price variances
Discuss variable and absorption costing : Select one of these costing methods and explore the various arguments. Determine whether you are "for" or "against" this selected method
What is meant by the term Sustainable Development : What is meant by the term "Sustainable Development"? Define the term "Business Responsibility" or "Corporate Social Responsibility"
Write up the fraud examination analysis : Why was the $36,000.00 check deposited into AIM, and why were Larsen Convenience Store disbursements made using AIM checks?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write programs which demonstrate your understanding of IPO

Foundations of Programming Assignment - Write programs which demonstrate your understanding of IPO and usage of simple functions in Python programs

  Estimate the storage space for telephone book

Estimate the storage space (number of bytes) required for each of the following items: A telephone book with 10,000 entries consisting of names, addresses and phone numbers. Use your phone book to estimate the average length of an entry.

  How many time is loop body of while statement executed

How many time is the loop body of the while statement executed? a) once, b) never, c) 49 times, d) 50 times, e) until a number 50 or larger is entered

  Write program which reads in side of a square

Write a program which reads in side of a square and then prints that square out of asterisks. Program must work for hollow squares of all side sizes between 1 and 20.

  Write the code for the instantiable class bus

Write the code for the instantiable class Bus, which represents a bus that moves passengers around in a simulated city. Bus objects have a ticket price, a maximum capacity of passengers, and a current number of passengers.

  Design and write a payroll program

Design and write a payroll program that will prompt the user to enter an employee's hourly pay rate and the number of hours worked.

  Write down a macro which writes the single character

Write down a macro named putChar which writes the single character, passed a macro argument, to standard output in assemble language.

  Create a contructor with default parameters

Create a class called Box which has private data members: length and width, both float area, found from length and width name which is a dynamic string constructor

  Write a program that asks for the principal

Write a program that asks for the principal, the interest rate, and the number of times the interest is compounded.

  Program to convert the currency

Display "Enter a currency value (positive number):"

  Create a checkbook program using c

Create a Checkbook program using C: Create a Check structure. Include: Check number (should be an integer). Date (use type char[ ])

  Php code to add-delete product using ajax programming

PHP Code to add a new product and delete a existing product Implement AJAX Programming based solutions to write code to add a new product to the database.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd