Question: Please write a Python program to generate a professional loan payment report from the first month until the loan balance becomes zero or less than

Please write a Python program to generate a professional loan payment report from the first month until the loan balance becomes zero or less than ten cents. Your program will not request any input from the user. Your program will set those values (for loan amount, annual interest rate, and monthly payment) accordingly to generate each report for each test case.

You have just purchased a stereo system that cost $1000.00 on the following loan plan (as test case #1): There is no down payment for this loan. The annual simple interest rate is 18.0% (and hence 1.5% per month or 0.015 per month). The monthly payment amount is $50.00. The monthly payment of $50.00 is used to pay the interest and whatever is left is used to pay part of the remaining debt. Therefore, the first month you need to pay 1.5% of $1000 as interest, which is $15.00. So, the remaining $35.00 (=$50.00 -$15.00) is deducted from your loan balance, which leaves you with a debt of $965.00 (=$1000.00 - $35.00). The next month, you need to pay 1.5% of $965 as interest, which is $14.48. Hence, you can deduct $35.52 (=$50.00 - $14.48) from your loan balance for this month. Then, you continue to pay for next month and so on until the loan balance is less than the monthly payment amount.

You may use a while loop such as: while (loanBalance >= monthPayment)

When the loan balance is less than the monthly payment, you must exit the while loop so that you can compute the final payment amount, which should be the loan balance plus its monthly interest. For example, if your last-months loan balance is $47.12, which is less than the monthly payment of $50.00, then its final payment should be $47.83 because $47.12 plus its monthly interest $0.71 (= 47.12 * 0.015) is $47.83.

Please make sure that your report is very user-friendly and very professional.

Your program does not request any input from the user for the monthly payment amount. You can simply change the monthly payment amount in your program from one run to another for each test case.

You may use the following statement to print those five values with proper alignments for each column. The formatting control is required to show only two digits after the decimal point for each value.

print ("%-2d" % month + " $%0.2f" % monthPay + " $%0.2f" % interest

+ " $%0.2f" % debtPaid + " $%0.2f" % loanBalance )

==========================================================================.

Your report must first show the following headline: (for example of test case #1)

Loan amount: $1000.0 Annual Interest Rate: 18.0% Monthly Payment: $50.0

Your report must then show the following five columns for each months payment until the loan balance is equal to 0 or less than 0.10:

Month # # Start from 1 for first month, 2 for second month, and so on

Month-Payment # Same for every month until the very last payment to pay off the loan balance

Interest-Paid # current-Loan-Balance * Monthly-Interest-Rate

Debt-Paid # Monthly-Payment Interest-Paid

Loan-Balance # Last-Month-Loan-Balance Debt-Paid

Your report must have the following line at the end to show the total interest amount being paid. Therefore, you need to create a variable (such as totalInterest) to accumulate all the interest payments while you are in the loop computing the detail of each month.

Total Amount of Interest Paid: $______________

==========================================================================.

You must run the following 3 test cases exactly for this assignment.

Your test case #1 is:

Loan amount: $1000.0 Annual Interest Rate: 18.0% Monthly Payment: $50.0

Your test case #2 is:

Loan amount: $1000.0 Annual Interest Rate: 18.0% Monthly Payment: $100.0

Your test case #3 is:

Loan amount: $1000.0 Annual Interest Rate: 18.0% Monthly Payment: $180.0

Each test case or test run must begin with a welcome message, and must end with a thank-you message.

=========================================================================.

The output of your test case #1 must look exactly as follows including the data:

Welcome to the Loan Payment Report of "Dr. Simon Lin" ! must use your name!

1==================================================================.

Loan amount: $1000.0 Annual Interest Rate: 18.0% Monthly Payment: $50.0

Month# Month-Payment Interest-Paid Debt-Paid Loan-Balance

---------- ------------------- -------------------- ----------------------- ------------------

1 $50.00 $15.00 $35.00 $965.00

2 $50.00 $14.47 $35.52 $929.48

3 $50.00 $13.94 $36.06 $893.42

. . .

21 $50.00 $2.86 $47.14 $143.53

22 $50.00 $2.15 $47.85 $95.68

23 $50.00 $1.44 $48.56 $47.12

24 $47.83 $0.71 $47.12 $0.00

Total Amount of Interest Paid: $197.83

2==================================================================.

Thank you for using the Loan Payment Report of "Dr. Simon Lin"! must use your name!

3==================================================================.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!