Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

JocelynC

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.

  • one year ago
  • one year ago

  • This Question is Closed
  1. JocelynC
    Best Response
    You've already chosen the best response.
    Medals 0

    ## 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

    • one year ago
  2. PhilipY
    Best Response
    You've already chosen the best response.
    Medals 1

    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

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.