Question: CODE IN PYTHON ONLY Given a set of weights 11,3,9,27), show that you can construct any number between 1 and 40. In other words, using
CODE IN PYTHON ONLY

Given a set of weights 11,3,9,27), show that you can construct any number between 1 and 40. In other words, using the set above and the addition and subtraction operations, construct any integer between 1 and 40 without re-using elements. For example, 4 = 1+1+1+1 is not acceptable. For example, 8=9-1 10- 19 Hint: see the itertools module. Your function should return a 4-element list of the decomposition. For example, your return value given input 10 should be 1,0,1,01 becase 1* 03+ 9127*0-10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
