Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing
I'm having trouble with ps1b, 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)
 one year ago
 one year ago
I'm having trouble with ps1b, 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)
 one year ago
 one year ago

This Question is Closed

Tomas.ABest ResponseYou've already chosen the best response.0
could you post the actual question as well please?
 one year ago

superavocadoBest ResponseYou've already chosen the best response.0
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.
 one year ago
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
 Engagement 19 Mad Hatter
 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.