is similar to computing interest on a charge card account, which was dis- cussed
ID: 3871437 • Letter: I
Question
is similar to computing interest on a charge card account, which was dis- cussed in this chapter.) You have just purchased a stereo system that cost $1,000 on the following credit plan: no down payment, an interest rate of 18% per year (and hence 1.5% per month), and monthly payments of $50. The monthly payment of $50 is used to pay the interest and whatever is left is used to pay part of the remaining debt. Hence, the first month you pay 1.5% of $ 1,000 in interest. That is $15 in interest. So, the remaining $35 is deducted from your debt, which leaves you with a debt of $965.00. The next month you pay interest of 1.5% of $965.00, which is $ 1 4 .48. Hence, you can deduct $35.52 (which is $50- $14.48) from the amount you owe. Write a program that will tell you how many months it will take you to pay off the loan, as well as the total amount of interest paid over the life of the loan. UIse a loop to calculate the amount of interest and the size of the debt after each month. (Your final program need not output the monthly amount of interest paid and remairn- ing debt, but you may want to write a preliminary version of the program that does output these values.) Use a variable to count the number of loop iterations and hence the number of months until the debt is zero. You may want to use other variables as well. The last payment may be less than $50. Do not forget the interest on the last payment. If you owe $50, then your 8.Explanation / Answer
Source Code in python:
principle=1000
emi=50
intrest=1.5
month=intr=0
while principle > 0:
intrest=round((principle * 1.5)/100)
intr=intr+intrest
principle-=(emi-intrest)
month+=1
print("Intrest is: $",intr)
print("No of months:",month)
output :
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.