The credit plan at TidBit Computer Store specifies a 10% The amount of principal for a month is equal to the monthly payment minus the interest owed. down payment and an annual interest rate of 12%. An example of the program input and output is shown below: Monthly payments are 5% of the listed purchase price, minus the down payment. Enter the puchase price: 200 Write a program that takes the purchase price as input. Month Starting Balance Interest to Pay Principal to Pay Payment Ending Balance The program should display a table, with appropriate 1 180.00 1.80 7.20 9.00 172.80 2 172.80 1.73 7.27 9.00 165.53 headers, of a payment schedule for the lifetime of the 3 165.53 1.66 7.34 9.00 158.18 loan. Each row of the table should contain the following 4 158.18 1.58 7.42 9.00 150.77 150.77 1.51 7.49 9.00 143.27 items: 6 143.27 1.43 7.57 9.00 135.71 7. 135.71 1.36 7.64 9.00 128.06 1. The month number (beginning with 1) 8 128.06 1.28 7.72 9.00 120.34 9 120.34 1.20 7.80 9.00 112.55 2. The current total balance owed 10 112.55 1.13 7.87 9.00 104.67 11 104.67 1.05 7.95 9.00 96.72 3. The interest owed for that month 12 96.72 0.97 8.03 9.00 88.69 13 88.69 0.89 8.11 9.00 80.57 4. The amount of principal owed for that month 14 80.57 0.81 8.19 9.00 72.38 15 72.38 0.72 8.28 9.00 64.10 55.74 5. The payment for that month 16 64.10 0.64 8.36 9.00 47.30 17 55.74 0.56 8.44 9.00 38.77 6. The balance remaining after payment 18 47.30 0.47 8.53 9.00 30.16 19 38.77 0.39 8.61 9.00 21.46 20 30.16 0.30 8.70 9.00 The amount of interest for a month is equal to balance x 21.46 12.68 21 0.21 8.79 9.00 3.80 rate / 12. 22 12.68 0.13 8.87 9.00 0.00 23 3.80 0.00 3.80 3.80 tidbit.py The amount of principal for a month is equal to the 1 # Put your code here 2 ANNUAL_RATE = .12 monthly payment minus the interest owed. 3 MONTHLY_RATE = ANNUAL_RATE / 12 4 5 purchasePrice = float (input("Enter the purchase price: ")) 6 7 monthlyPayment = .05 • (purchasePrice -(.10 • purchasePrice)) 8 month = 1 9 balance = purchasePrice 10 print("Month Starting Balance Interest to Pay Principal to Pay Payment Ending Balance") 11 while balance > 0: if monthlyPayment > balance: monthlyPayment = balance interest = o 12 13 14 15 else: 16 interest = balance MONTHLY_RATE principal = monthlyPayment - interest remaining = balance - monthlyPayment 17 18 19 print("%2d%15.2f%15.2f%17.2f%17.2f%17.2f" 20 (month, balance, interest, principal, monthlyPayment, remaining)) 21 balance = remaining 22 month 1 23
The credit plan at TidBit Computer Store specifies a 10% The amount of principal for a month is equal to the monthly payment minus the interest owed. down payment and an annual interest rate of 12%. An example of the program input and output is shown below: Monthly payments are 5% of the listed purchase price, minus the down payment. Enter the puchase price: 200 Write a program that takes the purchase price as input. Month Starting Balance Interest to Pay Principal to Pay Payment Ending Balance The program should display a table, with appropriate 1 180.00 1.80 7.20 9.00 172.80 2 172.80 1.73 7.27 9.00 165.53 headers, of a payment schedule for the lifetime of the 3 165.53 1.66 7.34 9.00 158.18 loan. Each row of the table should contain the following 4 158.18 1.58 7.42 9.00 150.77 150.77 1.51 7.49 9.00 143.27 items: 6 143.27 1.43 7.57 9.00 135.71 7. 135.71 1.36 7.64 9.00 128.06 1. The month number (beginning with 1) 8 128.06 1.28 7.72 9.00 120.34 9 120.34 1.20 7.80 9.00 112.55 2. The current total balance owed 10 112.55 1.13 7.87 9.00 104.67 11 104.67 1.05 7.95 9.00 96.72 3. The interest owed for that month 12 96.72 0.97 8.03 9.00 88.69 13 88.69 0.89 8.11 9.00 80.57 4. The amount of principal owed for that month 14 80.57 0.81 8.19 9.00 72.38 15 72.38 0.72 8.28 9.00 64.10 55.74 5. The payment for that month 16 64.10 0.64 8.36 9.00 47.30 17 55.74 0.56 8.44 9.00 38.77 6. The balance remaining after payment 18 47.30 0.47 8.53 9.00 30.16 19 38.77 0.39 8.61 9.00 21.46 20 30.16 0.30 8.70 9.00 The amount of interest for a month is equal to balance x 21.46 12.68 21 0.21 8.79 9.00 3.80 rate / 12. 22 12.68 0.13 8.87 9.00 0.00 23 3.80 0.00 3.80 3.80 tidbit.py The amount of principal for a month is equal to the 1 # Put your code here 2 ANNUAL_RATE = .12 monthly payment minus the interest owed. 3 MONTHLY_RATE = ANNUAL_RATE / 12 4 5 purchasePrice = float (input("Enter the purchase price: ")) 6 7 monthlyPayment = .05 • (purchasePrice -(.10 • purchasePrice)) 8 month = 1 9 balance = purchasePrice 10 print("Month Starting Balance Interest to Pay Principal to Pay Payment Ending Balance") 11 while balance > 0: if monthlyPayment > balance: monthlyPayment = balance interest = o 12 13 14 15 else: 16 interest = balance MONTHLY_RATE principal = monthlyPayment - interest remaining = balance - monthlyPayment 17 18 19 print("%2d%15.2f%15.2f%17.2f%17.2f%17.2f" 20 (month, balance, interest, principal, monthlyPayment, remaining)) 21 balance = remaining 22 month 1 23
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
PYTHON CODING
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education