## Problem Description and Formulation

The baker needs to create a mixture of milk and dark chocolate that contains at least 120 units of cacao and 80 units of sugar. The goal is to minimize the cost of the chocolate pieces while meeting these requirements.

Let's define the decision variables:
- \(M\): the number of milk chocolate pieces
- \(D\): the number of dark chocolate pieces

The constraints based on the given requirements are:
1. Cacao constraint: \(3M + 4D \geq 120\)
2. Sugar constraint: \(2M + D \geq 80\)
3. Non-negativity constraint: \(M \geq 0, D \geq 0\)

The objective function to minimize the total cost is:
\[ \text{Minimize:} \quad 0.50M + 0.75D \]

## Gurobi Code

To solve this linear programming problem using Gurobi, we will use the Gurobi Python API. First, ensure you have Gurobi installed in your Python environment. You can install it via pip:

```bash
pip install gurobi
```

Here's the Gurobi code for the problem:

```python
import gurobi as gp

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

# Define the decision variables
M = model.addVar(lb=0, name="Milk_Chocolate_Pieces")
D = model.addVar(lb=0, name="Dark_Chocolate_Pieces")

# Objective function: Minimize cost
model.setObjective(0.50 * M + 0.75 * D, gp.GRB.MINIMIZE)

# Cacao constraint: 3M + 4D >= 120
model.addConstr(3 * M + 4 * D >= 120, name="Cacao_Constraint")

# Sugar constraint: 2M + D >= 80
model.addConstr(2 * M + D >= 80, name="Sugar_Constraint")

# Optimize the model
model.optimize()

# Check if the model is optimized
if model.status == gp.GRB.OPTIMAL:
    print("Optimal solution found.")
    print(f"Milk Chocolate Pieces: {M.varValue}")
    print(f"Dark Chocolate Pieces: {D.varValue}")
    print(f"Total Cost: ${model.objVal:.2f}")
else:
    print("The model is infeasible or no solution exists.")
```