A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 4 years ago
ps1 problem 3, a few questions about the solution set:
1. The first loop is a while True loop. Is there ever a point which would return a False value, or does ending the loop depending on a break?
2. The test for finding a solution is: "if (high_payment  low_payment < 0.005)". Why not if ....<.01? Isn't .01 the accuracy required in the problem? Would <.01 not give an accurate enough response? Why?
3. Instead of the above two, I did while abs(balance)>.01 and nested another loop to simulate the passage of time. Is this better, worse, equivalent?
4. Why recompute the balance and months?
anonymous
 4 years ago
ps1 problem 3, a few questions about the solution set: 1. The first loop is a while True loop. Is there ever a point which would return a False value, or does ending the loop depending on a break? 2. The test for finding a solution is: "if (high_payment  low_payment < 0.005)". Why not if ....<.01? Isn't .01 the accuracy required in the problem? Would <.01 not give an accurate enough response? Why? 3. Instead of the above two, I did while abs(balance)>.01 and nested another loop to simulate the passage of time. Is this better, worse, equivalent? 4. Why recompute the balance and months?

This Question is Open

anonymous
 3 years ago
Best ResponseYou've already chosen the best response.01. The while True loop is an infinite loop. It will only end with a break. 2. Not sure. 3. Not sure. 4. I was wondering the same, so I tried it with and without recomputing the balance. The difference was that without recalculating postrounding the balance was +$0.01, and when recalculated after rounding the balance is $0.01. Thus, by rounding up to the highest cent we change the final balance by two cents.
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.