## Problem Description and Formulation

The Sweet Popcorn store has two types of popcorn: butter popcorn and caramel popcorn, with quantities of 35 pounds and 45 pounds, respectively. They offer two mixed bags: a family mix and a party mix. The family mix consists of 50% caramel popcorn and 50% butter popcorn, while the party mix consists of 80% caramel popcorn and 20% butter popcorn. The family mix sells for $4.5 a pound, and the party mix sells for $6 a pound.

Let's denote:
- \(B\) as the number of pounds of butter popcorn used,
- \(C\) as the number of pounds of caramel popcorn used,
- \(F\) as the number of pounds of family mix produced,
- \(P\) as the number of pounds of party mix produced.

The objective is to maximize profit. The profit per pound of family mix is $4.5, and the profit per pound of party mix is $6.

## Constraints

1. **Butter Popcorn Constraint**: The amount of butter popcorn used in both mixes cannot exceed 35 pounds. Given that the family mix has 50% butter popcorn and the party mix has 20% butter popcorn, we have:
\[ 0.5F + 0.2P \leq 35 \]

2. **Caramel Popcorn Constraint**: The amount of caramel popcorn used in both mixes cannot exceed 45 pounds. Given that the family mix has 50% caramel popcorn and the party mix has 80% caramel popcorn, we have:
\[ 0.5F + 0.8P \leq 45 \]

3. **Non-Negativity Constraints**: The amount of each mix produced cannot be negative:
\[ F \geq 0, P \geq 0 \]

## Objective Function

The objective is to maximize profit \(Z\), given by:
\[ Z = 4.5F + 6P \]

## Gurobi Code

```python
import gurobi

def solve_popcorn_problem():
    # Create a new model
    m = gurobi.Model()

    # Define variables
    F = m.addVar(name="Family_Mix", lb=0, ub=None)  # Pounds of family mix
    P = m.addVar(name="Party_Mix", lb=0, ub=None)   # Pounds of party mix

    # Objective function: Maximize profit
    m.setObjective(4.5 * F + 6 * P, gurobi.GRB.MAXIMIZE)

    # Constraints
    m.addConstr(0.5 * F + 0.2 * P <= 35, name="Butter_Popcorn_Constraint")
    m.addConstr(0.5 * F + 0.8 * P <= 45, name="Caramel_Popcorn_Constraint")

    # Solve the problem
    m.optimize()

    # Print the solution
    if m.status == gurobi.GRB.OPTIMAL:
        print("Optimal Solution:")
        print(f"Family Mix: {F.varValue} pounds")
        print(f"Party Mix: {P.varValue} pounds")
        print(f"Max Profit: ${m.objVal:.2f}")
    else:
        print("The problem is infeasible.")

solve_popcorn_problem()
```

This code defines the optimization problem using Gurobi's Python interface, solves it, and prints out the optimal production levels for the family and party mixes, along with the maximum achievable profit.