Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6. ( 6 points) When making major purchases such as real estate or vehicles, most people don't pay the entire amount up front. Instead, they

image text in transcribed
image text in transcribed
image text in transcribed
6. ( 6 points) When making major purchases such as real estate or vehicles, most people don't pay the entire amount up front. Instead, they finance the purchase by taking out a loan at a certain interest rate, and they agree to pay back the loan in monthly installments over a period of time. To compute the amount of a monthly payment, you need the following information: - P, initial amount of loan (in dollars) - r, monthly interest rate (as a decimal), which is the annual interest rate divided by 12 - n, number of months to make payments Given those values, the monthly payment M can be computed using the formula M=P(1+r)n1r(1+r)n For example, suppose you're financing a $20,000 car over 5 years, at an annual interest rate of 4.8%. Then, P=20000,r=0.048/12=0.004, and n=512=60. Substituting those values into the formula yields a monthly payment of M=375.59. Note that the total amount you pay is $375.59 per month over 60 months, which comes out to $22,535.69. Your loan ultimately costs an extra $2,535.69 in interest! Higher interest rates and/or longer loan terms will result in paying more over time. 1 1 In general, very few things are worth financing. If you can't afford to buy it in cash, you probably shouldn't be buying it... Page 4 of 6 COMP 1900 - Spring 2023 Lab 2 Due Sun., Feb. 12, by 2359 Central Write a program named monthly payments.py that allows the user to enter the following inputs: - Initial amount of loan, in dollars - Annual interest rate, as a percentage (e.g., 4.8 for 4.8% ) - Number of years to pay back the loan - Annual interest rate, as a percentage (e.g., 4.8 for 4.8% ) - Number of years to pay back the loan You may assume that all user inputs are valid. Your program should then calculate and show the monthly payment, the total amount paid over the entire loan term, and the total interest paid, all rounded to the nearest cent. Note that the user inputs the annual interest rate and the number of years to pay back the loan. However, the monthly payment formula requires values in terms of months. Be sure to convert accordingly. Example program run (underlined parts indicate what the user enters) Please enter the following information: Initial amount of loan: 220000 Annual interest rate ( in %):306.5 Number of years: Monthly payment: $1390.55 Total paid: $500597.87 Interest paid: $280597.87

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

Why has Negotiating Women, Inc. focused its attention on women?

Answered: 1 week ago

Question

2. What recommendations will you make to the city council?

Answered: 1 week ago

Question

3. The group answers the questions.

Answered: 1 week ago