A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 4 years ago
Can someone help walk me though ps1b i am still trying to understand while functions and what happens when they are nested together
anonymous
 4 years ago
Can someone help walk me though ps1b i am still trying to understand while functions and what happens when they are nested together

This Question is Closed

MicroBot
 4 years ago
Best ResponseYou've already chosen the best response.1please post your code with a paste site as pastebin.com, as it posts it correctly with the true indentations etc.:)

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0ok 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
 4 years ago
Best ResponseYou've already chosen the best response.0i 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
 4 years ago
Best ResponseYou've already chosen the best response.1ok 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
 4 years ago
Best ResponseYou've already chosen the best response.0well 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
 4 years ago
Best ResponseYou've already chosen the best response.0and yes enter balance at 1200 and .18 interest should yield a monthly payment of 120 and 11 months

MicroBot
 4 years ago
Best ResponseYou've already chosen the best response.1ah well then lets see....

anonymous
 4 years ago
Best ResponseYou've already chosen the best response.0i 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
 4 years ago
Best ResponseYou've already chosen the best response.1you 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).
Ask your own question
Sign UpFind 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.