OpenStudy (anonymous):

For PS2 #1-3, where you are working with polynomials, what exactly are we supposed to be computing? Are we supposed to be returning any sort of value? There don't seem to be any instructions on what to actually do. I tried looking at the solution code too, but was still unclear.

3 years ago
OpenStudy (anonymous):

Hi Kukala, For PS2, problems 1 and 2 do not involve any code. The solution to problem 1 will be the number of 6-piece, 9-piece, and 20-piece orders it takes to get exactly 50 chicken nuggets, to get exactly 51 chicken nuggets, etc up to 55. So your solution will look something like “To get exactly 50 chicken nuggets, buy one 20-piece order, one 9-piece order…” etc. The solution to problem 2 will be an explanation of the theorem that states “if you have the combination of orders that get you exactly x, x+1, x+2, x+3, x+4, and x+5 chicken nuggets with orders of 6, 9, and 20, you can definitely create a combination to get any number larger than x+5 exactly.” So the theorem says that if you know the combinations of orders that result in exactly 50 (which would be x), 51 (which is x+1), up to 55 (x+5), then you can definitely create a combination for 56, 57, etc up forever. Problem 3 will be code that calculates the largest number of chicken nuggets that you CANNOT get with orders of 6, 9, and 20. For example, you cannot get exactly 13 chicken nuggets- you would need an order of size 4 to pair with an order of size 9, but since there are no orders of 4 nuggets, you can’t get exactly 13. You also cannot get exactly 14 chicken nuggets. You can get exactly 15 (get an order of 6 and an order of 9), but you cannot get exactly 16. So your code will answer the question: “What the largest number you can’t get?” We know, based on questions 1 and 2 above, that it’s going to be less than 50. I actually spelled out the solution to problems 1 and 2 in another post which can be found here: http://openstudy.com/study#/updates/52aec4a8e4b0f72fdcf813f7 Check the 4th post in the thread. Best of luck!

3 years ago