## Problem Description and Formulation

Mary needs to minimize her cost while meeting her daily dietary requirements for vitamins A, C, and proteins. She has two options: a protein drink and a fruit snack, each with its own nutritional content and cost.

### Decision Variables

- $x_1$: Number of servings of protein drink
- $x_2$: Number of servings of fruit snack

### Objective Function

Minimize the total cost: $4x_1 + 12x_2$

### Constraints

1. Vitamin A: $45x_1 + 400x_2 \geq 100$
2. Vitamin C: $200x_1 + 600x_2 \geq 500$
3. Proteins: $300x_1 + 200x_2 \geq 3000$
4. Non-negativity: $x_1 \geq 0, x_2 \geq 0$

## Gurobi Code

```python
import gurobipy as gp

# Create a new model
m = gp.Model("Diet_Problem")

# Decision variables
x1 = m.addVar(name="protein_drink", lb=0, vtype=gp.GRB.CONTINUOUS)
x2 = m.addVar(name="fruit_snack", lb=0, vtype=gp.GRB.CONTINUOUS)

# Objective function: minimize cost
m.setObjective(4 * x1 + 12 * x2, gp.GRB.MINIMIZE)

# Constraints
m.addConstr(45 * x1 + 400 * x2 >= 100, name="vitamin_A")
m.addConstr(200 * x1 + 600 * x2 >= 500, name="vitamin_C")
m.addConstr(300 * x1 + 200 * x2 >= 3000, name="proteins")

# Solve the model
m.solve()

# Output solution
if m.status == gp.GRB.OPTIMAL:
    print("Optimal Solution:")
    print(f"Servings of protein drink: {x1.varValue}")
    print(f"Servings of fruit snack: {x2.varValue}")
    print(f"Total cost: ${m.objVal:.2f}")
else:
    print("No optimal solution found.")
```