Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Data Programming l - Python Write a program that takes the terms of a loan as inputs(principal, interest rate as a %, number of payments

Data Programming l - Python

Write a program that takes the terms of a loan as inputs(principal, interest rate as a %, number of payments per year, and the total number of years), computes the interest paid over the life of the loan and produces the output shown below. The examples shown below are for:

  1. Borrowing $100,000 for a condo financed over 30 years with 12 payments per year at 4.5%.
  2. Borrowing $25,000 for a car financed over 6 years with 12 payments per year at 3.5%.

The total amount paid for a loan (accrued amount) is given by the formula below where A is the amount accrued over the life of the loan including principal, P is the principal, r is the rate as a decimal, n is the number of payments made per year and t is the life of the loan in years. Use the round function to have at most 1 decimal place in the answer. A = P(1+r/n)nt{"version":"1.1","math":"A = P(1+r/n)nt"}

Input:

a) python C:\Users eda\DataProgramming\M1\assign1-4.py 100000 4.5 12 30

b) python C:\Users eda\DataProgramming\M1\assign1-4.py 25000 3.5 12 6

Output:

a) Interest Paid: $284769.8

b) Interest Paid: $5832.5

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

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions

Question

3x EZ, 3 y ez, x+y=2 AX-y=3 True False

Answered: 1 week ago

Question

Explain discipline and disciplinary action.

Answered: 1 week ago