Question: Please correct this #to show this table when the starting balalnce is 2 0 0 Write your program here def calculate _ payment _ schedule
Please correct this #to show this table when the starting balalnce is
Write your program here
def calculatepaymentschedulepurchaseprice:
downpayment purchaseprice
startingbalance purchaseprice downpayment
monthlypaymentrate
annualinterestrate
balance startingbalance
month
print Month Starting Balance Interest to Pay Principal to Pay Payment Ending Balance
print
while balance :
interesttopay balance annualinterestrate
payment purchaseprice monthlypaymentrate
# Ensure principal is non
negative
principal maxpayment interesttopay,
# Adjust payment if it exceeds the remaining balance interest
if payment balance interesttopay:
payment balance interesttopay
principal payment interesttopay
# Update the balance
endingbalance balance principal
# Print the row
printfmonth:startingbalance:finteresttopay:fprincipal:fpayment:fendingbalance:f
# Prepare for the next iteration
startingbalance endingbalance
balance endingbalance
month
purchaseprice floatinputEnter the purchase price:
calculatepaymentschedulepurchasepricecode
Enter the puchase price:
Month Starting Balance Interest to Pay Principal to Pay Payment Ending Balance
