i am having some problem in understanding pset2 can anyone tell me what we have to do in pset 2 problem 1
This program will tell you whether or not you can buy a certain number of nuggets given certain package sizes: def nuggets(n,x,y,z): for a in range(0,(n/x)+1): for b in range(0,(n/y)+1): for c in range(0,(n/z)+1): if x*a+y*b+z*c==n: return True You can use this program to show that you can buy 50,51,52,53,54,55 nuggets given packages of 6,9, and 20. Given that you can buy these amounts, you can show that you can buy 56,57,58...by induction or whatever the mathematical term is. Since you can buy 50, you can buy 56 since you can buy a package of 6. Since you can buy 51, you can buy 57 since you can buy a package of 6 and so on... Let me know if you need solutions to the third part of the problem.
Join our real-time social learning platform and learn together with your friends!