LoveMathFermat 2 years ago Hi fellow OCW students, http://paste.bradleygill.com/index.php?paste_id=3801 Here is my code. For some reasons, it got stuck in infinite circles with 'while' loop; not being able to move on to the 'for' loop. I'm having hard time finding why.

1. MicroBot

i believe it's this : you say that your Fblance is the Oblance (outstanding balance on your credit card) and u need while loop to stop when it has found the ideal solution...that is when balance is 0 or less. (if i remember right the assignment request). so NOW your while loop will stop only if balance is [-1,1] . And if it gets lower than -1 it will still run..... hope it helps!:)

2. bwCA

put a print statement in the while loop to help you see where the problem is - kinda like this: http://dpaste.com/971222/

3. RCMorea

4. LoveMathFermat

Thanks guys! I figured it out!

5. zaraali

please can anyone post the code of Problem set2 i'm doing this assignmnet since 5 hours but i,m getting so many errors in my code. please can anyone post the code here?

6. LoveMathFermat

which one are you referring to exactly? The one that I posted here or Problem Set #2 Successive Approximation and a Wordgame!???

7. zaraali

I want a code for problem set 2 of PROBLEM 1: PAYING THE MINIMUM please can you post the code.

8. LoveMathFermat

Here is my code: http://pastebin.com/9jLBC55J Hope it helps!

9. zaraali

10. zaraali

if we are checking are code on our dashboard on every submission it will deduct there marks or its just for correction?

11. zaraali

please can anyone tell me that in code how to subtract the payment and add the interest for each month ? in paying the minimum assignment. please help

12. zaraali

I have already wrote the program my output is also coming but the problem is in my output is that they giving all the same min-monthly-payment , remaining amount, is coming same for all months. what is wrong in code? please help me.

13. bwCA