anonymous
  • anonymous
Can someone help walk me though ps1b i am still trying to understand while functions and what happens when they are nested together
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
MicroBot
  • MicroBot
please post your code with a paste site as pastebin.com, as it posts it correctly with the true indentations etc.:)
anonymous
  • anonymous
ok thanks, my questions though is does the program run one iteration of the first while function then go onto the second and run all interations until it is complete then go back and run another interation of the first while function and repeat the process of the second??
anonymous
  • anonymous
http://pastebin.com/eTjTBxsW

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
i guess a better way of wording this is that the computer won't go past line 35 until the conditions of the while statements are correct. i understand that but once the it gets to the second while statement won't the second while statement be ran 12 times before it returns to the first one on line 15 then it adds 10 to monthly payments and runs through all the loops again
MicroBot
  • MicroBot
ok 1st of all u dont need the 1st while since u iterate balance in the 2nd. so try to fix this and see how it goes. i am now testing for correct results. did they give any test cases? so we know we are getting the correct results?
anonymous
  • anonymous
well this is an exact copy of the code they provided as a solution i am just trying to walk through it and understand how it works
anonymous
  • anonymous
and yes enter balance at 1200 and .18 interest should yield a monthly payment of 120 and 11 months
MicroBot
  • MicroBot
ah well then lets see....
anonymous
  • anonymous
i think i understand how this works now so no need i think just putting my questions to paper really helped me understand how it worked
MicroBot
  • MicroBot
you always have to put questions and steps in paper...it helps a lot! it is some kind of pseudocode that you are creating when putting ur thoughts in paper. if you need any other help just ask. (if you need i have an other version of this with for loops).

Looking for something else?

Not the answer you are looking for? Search for more explanations.