Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 17 Online
OpenStudy (anonymous):

I have to match the answer of one of my Assignments solution. Does in assignment of Diophantine equationsproblem number 4 solution is 43.

OpenStudy (anonymous):

It is if you leave the packages tuple set to 6, 9, 20 (which is what you discover when you solve Problem 3). Problem 4 requires your script to work with ANY three package sizes, not just 6, 9, and 20. So you'll need to test different combinations of package sizes before you can be sure.

OpenStudy (anonymous):

Thanks for help

OpenStudy (anonymous):

Here's my code if you want to match your results. I've made some changes to check if you can buy Nuggets in exact quantity in a range of values instead of just one (i.e. from 5 to 20 given packages of x, y and z Nuggets). Code: http://dpaste.com/hold/628578/

OpenStudy (anonymous):

Hi ManuStarlight. The magic number 6 in this problem should really the smallest package size of McNuggets when you're looking at Problem 4 (varying package sizes).

OpenStudy (anonymous):

I loved the Diophantine Nuggets exercise. Now I have my own app to tell me all the possibilities to buy X nuggets with combinations of 6, 9 and 20... I just need to add the prices of each box and I would have a software to tell me the cheapest way to buy X nuggets. Sometimes I just feel like this is playing god... too much power in my hands... do you imagine the possibilities of this software? I do not want to imagine what would happen if it fell on the wrong hands...

OpenStudy (anonymous):

...Obesity?

OpenStudy (anonymous):

Mc Donald's should pay these guys for the advertising, after working on this problem I couldn't resist it, I just had to go and buy a box of nuggets (it was a box of 10 though, which confused me somewhat).

OpenStudy (anonymous):

Hi ALearner, I didn't notice that mistake, I was solving the problem 3, and I forgot to replace that part of the code to make it useful for any package size, so thank you for your advice =D

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!