anonymous
  • anonymous
I'm having trouble with ps1-b, my code doesn't work for a monthly payment that's bigger than 10 $. But I don't know why. Can someone help me? balance = float(raw_input("Enter the outstanding balance: ")) an_int_rate = float(raw_input("Enter the annual interest rate as a decimal: ")) mon_int_rate = an_int_rate/12 mon_pay = 0; while balance > 0: mon_pay += 10 n = 0 while n < 12 and balance > 0: print mon_pay, n n += 1 interest = mon_int_rate * balance balance -= mon_pay balance += interest balance = round(balance,2)
MIT 6.189 A Gentle Introduction to Programming Using Python (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.
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
could you post the actual question as well please?
anonymous
  • anonymous
Found my mistake. I used the "wrong" balance. Sorry I assumed that there are more people doing the same course (mit 6.00), that would know what I'm talking about.

Looking for something else?

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