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

I have a question about PS 2, problem 1. I'm trying to write a program that will give all of the combinations of McNugget boxes for a given user input. It'll work for denominations of 6 and 9, however, for some reason, I can't for the life of me understand why it will not return the denomination of 20 McNuggets. Here's my code - can anyone take a peek at it and let me know what is going wrong? Thanks a lot! http://pastebin.com/6Kg7bz42

OpenStudy (anonymous):

Have you tried without the elif at the bottom? Comment it out and test it. Your program output here was quite ok.

OpenStudy (anonymous):

Works great now! Thanks for the tip, bmp.

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!