A community for students. Sign up today!
Here's the question you clicked on:
 0 viewing
 one year ago
HI  I'm very new to computer programming and I cant even get through Problem set 1 by looking at the solution that is provided! why is it that when I enter minMonthlyPaymentRate it's gives me syntax error? i guess it makes sense cause it's not correct per say, but that's how they do it according to the solution. please help:)
 one year ago
HI  I'm very new to computer programming and I cant even get through Problem set 1 by looking at the solution that is provided! why is it that when I enter minMonthlyPaymentRate it's gives me syntax error? i guess it makes sense cause it's not correct per say, but that's how they do it according to the solution. please help:)

This Question is Open

Kidneys
 one year ago
Best ResponseYou've already chosen the best response.0you may be missing ' ' give me an example of what you have written

Mal.bengt
 one year ago
Best ResponseYou've already chosen the best response.0minMonthlyPaymentRate = float(raw_input("enter minimum monthly payment rate")

Mal.bengt
 one year ago
Best ResponseYou've already chosen the best response.0it's just giving a syntax error message for the left side of the equal sign

Kidneys
 one year ago
Best ResponseYou've already chosen the best response.0== the product is equal to. give this a try..how mine is written

bdean20
 one year ago
Best ResponseYou've already chosen the best response.0You may also be missing a close bracket at the end of that line (note: brackets are also called parenthesis). The easiest way for us to figure out a problem you're having is to post all of the code here (make sure that the spacing is right!). It also helps to see the specific error python gave you.

Kidneys
 one year ago
Best ResponseYou've already chosen the best response.0##heres how i figured this out..very unorthodox and kinda cheating but it works:: x=float(raw_input('Outstanding balance:')) y=float(raw_input('Monthly interest rate:')) if x*y % 95.83: print 'Minimum monthly payment: 95.83' this is only what i did playing around with the idea..not really what should happen!!!!

Kidneys
 one year ago
Best ResponseYou've already chosen the best response.0original_balance = float(raw_input("Enter the outstanding balance on your credit card: ")) interest_rate = float(raw_input("Enter the annual credit card interest rate as a decimal: ")) balance = original_balance low_payment = balance/12 high_payment = (balance*(1+(interest_rate/12))**12)/12 while True: balance = original_balance monthly_payment = (low_payment + high_payment)/2 for month in range(1,13): interest = round(balance*interest_rate/12, 2) balance += interest  monthly_payment if balance <= 0: break if (high_payment  low_payment < 0.005): print "RESULT" monthly_payment = round(monthly_payment + 0.004999, 2) print "Monthly payment to pay off debt in 1 year:", round(monthly_payment,2) balance = original_balance for month in range(1,13): interest = round(balance*interest_rate/12, 2) balance += interest  monthly_payment if balance <= 0: break print "Number of months needed:", month print "Balance:", round(balance,2) break elif balance < 0: high_payment = monthly_payment else: low_payment = monthly_payment If completed correctly this is how the script should look.

bwCA
 one year ago
Best ResponseYou've already chosen the best response.0please use a code pasting site  it makes it easier for everyone to refer to it (don't forget to enable syntax highlighting) http://dpaste.com http://pastebin.com (there are others) http://www.pythontutor.com/ is a good debugging tool

bwCA
 one year ago
Best ResponseYou've already chosen the best response.0@Mal.bengt you are definitely missing a closing paren in that line you posted
Ask your own question
Ask a QuestionFind more explanations on OpenStudy
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.