Question: Please use python. Problem 3 : creating an amoritization schedule. Supposed that $ 1 0 0 0 is borrowed at the beginning of the year.
Please use python. Problem : creating an amoritization schedule. Supposed that $ is borrowed at the beginning of the year. The loan is charged interest at an annual interest rate of The borrower will repay the loan by making payments of $ at the end of the year until the loan is repaid. Note that when the final payment is made, the balance will be less than $ and so a partial payment will be made at that time.
Perform the following steps in a single code cell.
Create variables named balance, i and pmt to store the intial loan amount, annual interest rate, and annual payment amount mentioned in the paragraph above. Also create a variable n to track the number of payments.
Using a while loop to perform the tasks described below. The loop should continue to execute for as long as the balance of the loan is greater than
Increase the number of payments that have been made by
Calculate the new balance. This will be done by multiplying the current balance by i and then
subtracting the payment amount. Store the result back into balance, rounded to decimal places.
If the new balance is less than then calculate the the final payment amount. This will be equal to the
new balance plus the payment amount. Then set the balance to
Print the message below, with the xxxx symbols replaced with the appropriate values. Match the
format exactly.
The balance at the end of year xxxx is $xxxx
The first two lines of output should appear as shown below:
The balance at the end of year is $ The balance at the end of year is $
No lists should be created for this problem, and only one loop should be used.
Use a new code cell to print the final payment amount with a message as shown below:
The amount of the final payment will be $xxxx
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
