A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing


  • 5 years ago

Gosh! Finally finished problem set 2. Here is my ps2b.py code. Somehow it was more challenging than I expected. I spent couple of days solving the problem. Would appreciate your comments. http://pastebin.com/wkWxHy5v

  • This Question is Closed
  1. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    The only thing I would add is that you do not need to check each coefficient up to the number of nuggets. For instance, if you were trying to buy 100 nuggets with 20 piece boxes. You do not need to try 20 * 100. Only up to 20 * 5. This will reduce the amount of calculations needed when there isn't a solution.

  2. vaboro
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    thank you, xhaereticusx, I will have a look at it appreciate very much

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

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

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...


  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • 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.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.