A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 5 years ago
Hey I don't get how to do Problem 3 of pset 2. I don't know if it's necessary but here is my answer for problem 1 of pset 2.
http://pastebin.com/N7gS2uvM
and here is my code so far from problem 3 i keep getting no solution for all answers tho.
anonymous
 5 years ago
Hey I don't get how to do Problem 3 of pset 2. I don't know if it's necessary but here is my answer for problem 1 of pset 2. http://pastebin.com/N7gS2uvM and here is my code so far from problem 3 i keep getting no solution for all answers tho.

This Question is Closed

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0Just before pset2 prob 3 there is an explanation of how to write the code for prob 3  try to turn it into a function. The theory is that if you can find 6 successive numbers of nuggets that you CAN buy then you can buy all numbers above that number. So just start at one, can you buy one? no, can you buy two? no ... keep increasing the number  every time you find a number you can't buy, save it. If the theory is true, eventually you will find six in a row that you CAN buy  you are done  the last number you saved (because you could NOT buy it) is the highest number of of nuggets you can't buy ... there are probably other ways to do it it helps to put print statements in your code to see what it is doing and see if it is doing what you want  print variables, print counters, print results of tests or calculations. you can always comment them out when they become obnoxious

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0Sorry I forgot to post the second link last night i have already started it i just keep getting no solution and i don't know why? http://pastebin.com/ypiRdb5k
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.