anonymous
  • anonymous
Sorry for all the questions! In the first problem, "Credit Card Debt," how would one find the total principle paid? I know that in the program below, it is all the values of r added up, but I can't figure out how to deal with it in each separate time it loops.
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
## Calculate balance for compound interest. x = float(raw_input('Enter current balance ')) y = float(raw_input('Enter annual interest rate ')) z = float(raw_input('Enter minimum monthly payment rate ')) for ans in range(1,13): t = x * z p = (y/12.0) * x r = t - p x = x - r print 'Minumun monthly payment ', t print 'principle paid ', r print 'remaining balance ', x print 'Total principle paid ', ~blank spot...~ print 'Balance ', x
anonymous
  • anonymous
Total principle paid, start with a var outside your loop. So after you ask the user to input their x, y and z, name a new var and make it equal to 0. a = 0 in the loop, you do something like a = a + r and then at the end when you are printing your results, you just print var a. I think this should get you your total principle paid over 12 months

Looking for something else?

Not the answer you are looking for? Search for more explanations.