Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

using Python (latest 3 version) {Financial application: compare loans with vario

ID: 3805410 • Letter: U

Question

using Python (latest 3 version)

{Financial application: compare loans with various interest rates) Write a pro- gram that lets the user enter the loan amount and loan period in number of years and displays the monthly and total payments for each interest rate starting from 5% to 8%, with an increment of 1/8. Here is a sample run: 162 Chapters Loops Loan Amount: 10000 Center | Number of Years: 5 1 -1 Enter j Interest Rate Monthly Payment Total Payment 5 . 000% 188.71 11322.74 5.125% 189.28 11357.13 5.250% 189.85 11391.59 7.875% 202.17 12129.97 8 . 000% 202.76 12165.83

Explanation / Answer

import java.util.Scanner; public class compareLoansWithInterestRates { public static void main(String[] args) { Scanner input = new Scanner (System.in); System.out.print("Loan Amount :"); int loan = input.nextInt(); System.out.print("Number of Years" ); int years = input.nextInt(); double monthPay, totalPay,interestRate; System.out.println( "Interest Rate Monthly Payment Total Payment"); for(double rate =0.05; rate