Question: My code is giving the wrong answer: Code answer: 1 7 2 0 . 0 0 7 . 2 0 2 8 . 8 0
My code
is giving the wrong answer:
Code answer:
Correct answer:
Prompt:
Write a program in the file tidbit.py that takes the purchase price as input. The program should display a table, with appropriate headers, of a payment schedule for the lifetime of the loan. Each row of the table should contain the following items:
the month number beginning with
the current total balance owed
the interest owed for that month
the amount of principal owed for that month
the payment for that month
the balance remaining after payment
The amount of interest for a month is equal to balance rate The amount of principal for a month is equal to the monthly payment minus the interest owed. LO:
My Cod# Request the inputs and convert values
downPayment
annualInterest
paymentPercentage
purchasePrice floatinputEnter the purchase price:
# calculate starting, monthly interest, and payment
startingBalance purchasePrice downPayment
interestRate annualInterest
payment startingBalance paymentPercentage
month
print
# display the header
prints s s s s sMonth "Starting Balance",
"Interest to Pay", "Principal to Pay", "Payment", "Ending Balance"
# compute and display results
while startingBalance :
interest startingBalance interestRate
if payment startingBalance interest:
payment startingBalance interest
principal payment interest
endingBalance startingBalance principal
printd f f f f fmonth startingBalance,
interest, principal, payment, endingBalance
startingBalance endingBalance
month e:
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
