Question: In python Problem 2 You are on a diet and can only eat 750 calories per day. There are food items that you enjoy more
In python
Problem 2 You are on a diet and can only eat 750 calories per day. There are food items that you enjoy more than others. The following table lists the value and calories of each kind of food: Food wine beer pizza burger fries coke apple donut Value 89 90 30 50 90 79 90 10 calories 123 154 258 354 365 150 95 195 Create a program that selects the optimal mix of food items that will maximize your value, and not exceed the limit of 750 calories. Assume that you can pick at most one of each kind of food. Notes: O You should use recursion in your solution Suggestion: after you pick an item, recursively call the function to solve the problem with the remaining items, and the remaining calories This is a combinatorial problem. This is NOT a permutations problem, since the order of the items doesn't matter. There are C(8,8) = 6435 possible combinations of 8 items without repetitions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
