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

I'm having some problems understanding Problem Set 1 Problem 2. Specifically, how to I calculate the monthly payment while updating the changing interest? Thanks, any help will be greatly appreciated! An

OpenStudy (anonymous):

"Now write a program that calculates the minimum fixed monthly payment needed in order pay off a credit card balance within 12 months. We will not be dealing with a minimum monthly payment rate." Is what is asking for.

OpenStudy (anonymous):

the beginning balance and interest rate are fixed. you need to try different monthly payments and see if it will pay off the balance within 12 months. just guess at a monthly payment then after 12 payments; if the balance is positive increase the monthly payment, if the balance is negative decrease the monthly payment. you need to choose some tolerance for the end balance like less then or equal to zero but more than $-0.05. every time you start over with a different monthly payment you need to make sure you use the initial balance.

OpenStudy (anonymous):

use loops: while loops and for loops one for the different monthly payments and one for calculating the balance after thirteen payments. sometimes it helps to write down in text what you need to do.

OpenStudy (anonymous):

Ok, both of those sound like they'll be helpful. Thanks!

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!