A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 5 years ago
Problem set 2 #4
anonymous
 5 years ago
Problem set 2 #4

This Question is Closed

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0http://ocw.mit.edu/courses/electricalengineeringandcomputerscience/600introductiontocomputerscienceandprogrammingfall2008/assignments/pset2.pdf i'm getting nothing....

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0Do you still have the fixed script from pset2c that I helped you make ?

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0alright i think i was overthinking #4 and trying to completely rewrite...this one yields the right answers and the values for the packages can be easily changed. but im wondering, i know it works, but is it what the problem set is asking for?

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0Your first answer is right but when it says the largest number that cannot be bought is 50 which is wrong. Also what I did on mine is put a raw_input so that I don't have to change the code when I want to change the sizes.

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0remember in your pset2c code your while loop was while count<5.( not 6) so therefor your while loop is while count<x1.

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0does that work in all scenarios? because the point is to have 6 (or whatever the smallest package size is) consecutive integers

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0heres one that works, its just a little different because the final result is n(x+1)

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0by doing while count<x1 it cancels out th n(x+1)

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0but say theres a sequence that reaches a count of x1 but then doesnt make it all the way to x

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0it would still go through

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0and you don't want it to in that scenario

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0it happens to work in the 6,9,20 scenario because the first sequence of 5 ALSO happens to be the first sequence of 6 but say it wasnt?

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0I don't get what your saying because if the count<1 less than x it will stop at the same point asprinting n(x+1)

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0ahhh whatever its too hard to explain in words lol... both our ideas work so just use the one that makes sense to you haha.. arite cya

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0Hey sorry about earlier I had just woke up and what you were typing jut wasn't making sense but yes you are right the way I did mine won't come out correctly every time thanks for pointing that out and I fixed mine haha.
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.