Question

# I am having issues with this problem. I was able to get one of the...

I am having issues with this problem. I was able to get one of the checks to work but then the other part of the check is wrong. This is the question:

The credit plan at TidBit Computer Store specifies a 10% down payment and an annual interest rate of 12%. Monthly payments are 5% of the listed purchase price, minus the down payment.

Write program 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:

1.     The month number (beginning with 1)

2.     The current total balance owed

3.     The interest owed for that month

4.     The amount of principal owed for that month

5.     The payment for that month

6.     The balance remaining after payment

The amount of interest for a month is equal to balance × rate / 12.

The amount of principal for a month is equal to the monthly payment minus the interest owed.

An example of the program input and output is shown below:

Enter the puchase price: 200

```Month Starting Balance Interest to Pay Principal to Pay Payment Ending Balance
1        180.00          1.80            7.20            9.00          172.80
2        172.80          1.73            7.27            9.00          165.53
3        165.53          1.66            7.34            9.00          158.18
4        158.18          1.58            7.42            9.00          150.77
5        150.77          1.51            7.49            9.00          143.27
6        143.27          1.43            7.57            9.00          135.71
7        135.71          1.36            7.64            9.00          128.06
8        128.06          1.28            7.72            9.00          120.34
9        120.34          1.20            7.80            9.00          112.55
10        112.55          1.13            7.87            9.00          104.67
11        104.67          1.05            7.95            9.00           96.72
12         96.72          0.97            8.03            9.00           88.69
13         88.69          0.89            8.11            9.00           80.57
14         80.57          0.81            8.19            9.00           72.38
15         72.38          0.72            8.28            9.00           64.10
16         64.10          0.64            8.36            9.00           55.74
17         55.74          0.56            8.44            9.00           47.30
18         47.30          0.47            8.53            9.00           38.77
19         38.77          0.39            8.61            9.00           30.16
20         30.16          0.30            8.70            9.00           21.46
21         21.46          0.21            8.79            9.00           12.68
22         12.68          0.13            8.87            9.00            3.80
23          3.80          0.00
```

and this is what I have for my answer, but I am not getting all the checks for my python code.

# Total price

price = float(input("Total computer cost:"))

# Price after down payment

starting_price = (price * 0.9)

# Monthly payment (5 percent of remaining price)

monthly_payment = starting_price * 0.05

# Interest owed for this month

interest_owed = starting_price * (.12/12.0)

# Principal for this month

principal = monthly_payment - interest_owed

# Ending price

ending_price = starting_price - principal

# Month

month = 1

# Print stuff

print("Month", "   Starting Balance", "   Interest to Pay", "  Principal to Pay", " Payment", "     Ending Balance")

print("%0d %20.2f%20.2f%20.2f%13.2f%23.2f" %(month, starting_price, interest_owed, principal, monthly_payment, ending_price))

while ending_price > 0:

month += 1

starting_price -= principal

interest_owed = starting_price * (.12/12.0)

principal = monthly_payment - interest_owed

ending_price -= principal

if ending_price > 0:

print("%0d %20.2f%20.2f%20.2f%13.2f%23.2f" %(month, starting_price, interest_owed, principal, monthly_payment, ending_price))

else:

print("%0d %20.2f%20.2f" %(month, starting_price, 0.00))

Solved by verified expert
<p>iscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor si</p> Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet

Explore over 16 million step-by-step answers from our library

ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam

ce dui lectus, co, dictum vitae odio. Donec ali

odioirem ipsum dolor sit amet, consecte

, dictum vitae oifficitur laoreet. Nam risus ante, dapib

sum dolor sit ameientesque dapibus efficitur laoreet

usce dui lectusifficitur laoreet. Nam risus a

ipsum

ctum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consecte

dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipi

Step-by-step explanation

iscing elit. Nam lacinia pulvinar tortor neonec aliquet. Lorem iicitur laoreet. Npulva. Fuscicitur laoreet. Nam risus adictctum vitae odio. Donec aliquet. Looec facilisiscongue vel laoreet acctum vitae odifacilisis. Pellentesque dtesque dapibus efficitur laoreet. Nams a molestie consequat, ultrices ac magnaac, dictum vitae odio. Donec aliquet. Lorem iponec aliquet. Lorem ipsum dolor sit amet, consectetur adips a molestie consequatultrices ac magna. Fusce dui lectus, congue velac, dictum vitoipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentctrisusxs ante, dapibus a molestie consequat, ultrices aongue vesum doltentesque dapibusttrices ac magna.onor nec facilisis.trisus anttmolestie conseque velet, consectetur adipiscing elit.oiscina molestie consequat, ultrisus ante, dapibus a molestie consequat, ultrices ac magnaac, disat, ultrices ac magna. Fusce dui lectus, congs a molestieec aliquet. Lorem ipsum dolor sit amet, ctesque dapibus efficitur laoreetrices ac magna. Fusce dui lectus, congue vel laosus ante, dapibus a molestierisus ante, dapibus a molestie consequat, ultrices ac magna. Fusce duiipsuur laom risus ante, dapibus aipiscing elur laoreet. Namng elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus eusce dui lectus,amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor necac, dictum vitsum dolor sit amet, consectetur adipiscing elit. Nam laciniamet, consectetultrices ac magna. Fusce dui lectus, congue vel laoreet ac,ctum vitae odio. Donec aliquet. Lorem ipsuac, diitur laoreet. Nam risus ante, dapibus a molestie consequat,ac, diur laoreet. Nam risus ante, dapibus a molestie conseac, dirisusxpulvinar tortor nec facilisis. Pellentesque dapibus efficiipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Po. Donec aliquet. Lorem ipsum dolor sit ametmolestie consequat, ultrices ac magna. Fusce dui lectus, congue vec facilisiso

sus ante, dapibu

ctum vitae odio

2 Attachments
PNG
PNG
Student reviews
100% (2 ratings)