Sale!

COP 2002 Project 9-1: Monthly Payment Calculator solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (5 votes)

Create a program that calculates the monthly payments on a loan
Console
Monthly Payment Calculator
DATA ENTRY
Loan amount: 500000
Yearly interest rate: 5.6
Years: 30
FORMATTED RESULTS
Loan amount: $500,000.00
Yearly interest rate: 5.6%
Number of years: 30
Monthly payment: $2,870.39
Continue? (y/n): y
DATA ENTRY
Loan amount: 500000
Yearly interest rate: 4.3
Years: 30
FORMATTED RESULTS
Loan amount: $500,000.00
Yearly interest rate: 4.3%
Number of years: 30
Monthly payment: $2,474.36
Continue? (y/n): n
Specifications
 The interest rate should only have one decimal place for both the calculation and the formatted
results.
 The formula for calculating monthly payment is:
month_payment = loan_amount * monthly_interest_rate / (1 – 1 / (1 + monthly_interest_rate) ** months)
 Use the locale module to ensure the results are formatted for the proper location.
 Use the decimal module and its quantize() method for rounding.
 Assume that the user will enter valid data.
 Save the file with the filename month_payment_XXX.py where XXX is either your initials or your
last name.
Hint
 You may find the Future Value program on pp. 264-265 of the textbook to be helpful.