Question

Write a python program for the below question? Car Loan If A dollars is borrowed at...

Write a python program for the below question?

Car Loan If A dollars is borrowed at r% interest compounded monthly to purchase
a car with monthly payments for n years, then the monthly payment is given
by the formula
monthly payment = i / 1 - (1 + i)-12n . A
where i = r/1200. Write a program that calculates the monthly payment after the
user gives the amount of the loan, the interest rate, and the number of years.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Program:

# Prompt and read the loan amount
A = int(input("Enter the amount of loan: $"))
# Prompt and read the interest rate
r = float(input("Enter the interest rate: "))
# Prompt and read the number of years
n = int(input("Enter the number of years: "))
# Calculate the interest rate per month
i = r / 1200
# Calculate the monthly payment
monthlyPayment = (i / (1- pow((1 + i),(-12 * n)))* A)
# Display the result
print("The monthly payment is: ${0:.2f}".format(monthlyPayment))

Output:

Python 3.6.4 Shell Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel )] on win32 Type copyright

Program Screenshot:calculateMonthlyPaymentForCarloan.py - E:/Python/calculateMonthlyPaymentForCarloan.p.... - onthlyPaymentForCarLoan File Edit

Add a comment
Know the answer?
Add Answer to:
Write a python program for the below question? Car Loan If A dollars is borrowed at...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • MATLAB!!! CAN SOMEONE SOLVE THIS PROBLEM ON MATLAB?? THANK YOU PART B: HOUSING LOAN CALCULATOR In this part of the assignment, you are expected to develop a program that calculates housing loan pay-...

    MATLAB!!! CAN SOMEONE SOLVE THIS PROBLEM ON MATLAB?? THANK YOU PART B: HOUSING LOAN CALCULATOR In this part of the assignment, you are expected to develop a program that calculates housing loan pay- ments based on compound interest formulas The program should prompt a user to input the amount borrowed (principal), p, the number of monthly payments, n, and an annual interest rate in R percent. The program should convert the annual interest rate R into a monthly interest rate...

  • Please I wish you use Python 3.7 for this problems. Q1. Write a program that receives...

    Please I wish you use Python 3.7 for this problems. Q1. Write a program that receives a series of numbers from the user and allows the user to press the enter key to indicate that he or she is finished providing inputs. After the user presses the enter key, the program should print the sum of the numbers and their average. Q2. The credit plan at TidBit Computer Store specifies a 10% down payment and an annual interest rate of...

  • Mark has borrowed $22213 to finance the purchase a second hand car. The loan is to...

    Mark has borrowed $22213 to finance the purchase a second hand car. The loan is to be repaid over five years with monthly payments. Interest on the loan is charged monthly at 9.2% p.a. How much will each payment be, if Mark makes the first payment right away, on the day the car is delivered? (Give your answer to the nearest cent, omitting the dollar sign.) Answer:

  • answer those 4 please Fatima just borrowed 83,364 dollars. She plans to repay this loan by...

    answer those 4 please Fatima just borrowed 83,364 dollars. She plans to repay this loan by making a special payment of 29,387 dollars in 7 years and by making regular annual payments of 13,147 dollars per year until the loan is paid off. If the interest rate on the loan is 17.93 percent per year and she makes her first regular annual payment of 13,147 dollars immediately, then how many regular annual payments of 13,147 dollars must Fatima make? Round...

  • c++ and please add tables and everything and make sure program is complete. Write a menu...

    c++ and please add tables and everything and make sure program is complete. Write a menu driven program, which would compute compound interest and a monthly payment for a loan. The user will be given a choice to display the info on the screen or to a filo Menu will be the following Enter (1) to calculate your loan monthly payment Enter (2) to calculate your loan monthly payment & write to a file Tips: Compound Interest Formula A =...

  • The program is in python :) Write a code program to calculate the mortgage payment. The...

    The program is in python :) Write a code program to calculate the mortgage payment. The equation for calculating the mortgage payment is: M = P (1+r)n (1+r)n-1 Where: M is your monthly payment P is your principal r is your monthly interest rate, calculated by dividing your annual interest rate by 12. n is your number of payments (the number of months you will be paying the loan) Example: You have a $100,000 mortgage loan with 6 percent annual...

  • • 1) A new car is purchased and a $20,000 loan is taken. The loan is...

    • 1) A new car is purchased and a $20,000 loan is taken. The loan is for 5 years (60 months) and the interest rate is 7.9% compounded monthly. What is the monthly payment? • 2)A new car is purchased and a $20,000 loan is taken. The loan is for 5 years (60 months) and the interest rate is 7.9% compounded monthly. What is the balance after 3 years? . 3) A new car is purchased and a $30,000 loan...

  • Program Specification: This project involves implementing a Java program that performs a calculation of payments associated...

    Program Specification: This project involves implementing a Java program that performs a calculation of payments associated with loans. The program shall allow a user to enter the following data: annual interest rate the loan (i.e. , number of years), and the loan amount. A GUI like the one below must be used. Loan Calculator Annual Interest Rate: Number of Years Loan Amount: Monthly Payment Total Payment Calculate When the user presses the calculate button, the monthly payment and total amount...

  • Data Programming l - Python Write a program that takes the terms of a loan as...

    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: Borrowing $100,000 for a condo financed over 30 years with 12 payments per year at 4.5%. Borrowing $25,000 for a car financed over 6 years...

  • A person borrowed $30000 to finance the purchase of a new vehicle. The loan will be...

    A person borrowed $30000 to finance the purchase of a new vehicle. The loan will be paid off in 5 years, and the borrowing interest rate is 6%. The person is required to make monthly payments to the loan. What is the amount of monthly payment? N (number of loan payments) =    I (monthly interest rate) =   % PV (amount borrowed) = FV (ending loan balance) =    PMT (required monthly payment) =

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT