Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 14 Online
OpenStudy (shipwreck81):

pretty close with this one but keep getting invalid syntax error and highlights my '=' after my while, #project 1 problem set 2 'paying off debt in a year' annual_interest_rate = 0.18 balance = 1200 monthly_payment = 10 number_of_months = 0 monthly_payment_rate = annual_interest_rate/ 12 while updated_balance = balance * ( 1 + monthly_payment_rate) - monthly_payment : if updated_balance > 0: number_of_months += 1 if number_of_months = 12: monthly_payment += 10 else updated_balance <= 0: print number_of_months print updated_balance

OpenStudy (kva1992):

i believe the reason you are having the error is because you cannot just use the = operator you are supposed to use == to specify equals in an if or while statement

OpenStudy (kva1992):

did that fix your issue?

OpenStudy (shipwreck81):

nice thank you that fixed that problem, still not working yet but closer than I was

OpenStudy (shipwreck81):

nice thank you that fixed that problem, still not working yet but closer than I was

OpenStudy (kva1992):

alright cool glad i was able to help

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!