Question
Intro to programming using Python Write a program to compute the monthly payment and total payment. The program will ask the user for the annual
Intro to programming using Python
Write a program to compute the monthly payment and total payment. The program will ask the user for the annual interest rate and the number of years and loan amount. Here are the formulae needed:
monthlyInterestRate = annual interest rate / 1200
monthlyPayment = loanAmount * monthlyInterestRate / (1 - 1 / (1 + monthlyInterestRate) ** (numberOfYears * 12))
totalPayment = monthlyPayment * numberOfYears * 12
Sample program run below, user input in blue. Run program 4 more times with different user input and its output. Check each output with an online amortization calculator to verify your program runs correctly.
You will provide your own data for test run 2, 3, 4 , and 5 . Use test run 1 that was provided for you below. Include test run 1 in your output to make up to 5 test runs for your submission. Output must look exactly as shown below. Here is a sample test run(blue user input): >>> Test Run 1 Enter annual interest rate, (e.g., 7.25) : 4.5 Enter number of years as an integer, (e.g., 5) : 30 .Enter loan amount, (e.g., 120000.95) : 350000.50The monthly payment is 1,773.40 The total payment is 638,424.40 Test Run 2 Run the program again and enter different user value and paste it here Test Run 3 Run the program again and enter different user value and paste it here Test Run 4 Run the program again and enter different user value and paste it here Test Run 5 Run the program again and enter different user value and paste it here >>>
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started