## Problem Description and Formulation

The electronics store owner wants to maximize profit by determining the optimal number of headsets and keyboards to keep in inventory. The problem can be formulated as a linear programming (LP) problem.

### Decision Variables

* \(H\): Number of headsets
* \(K\): Number of keyboards

### Objective Function

The store earns $80 in profit from each headset and $50 from each keyboard. The objective is to maximize the total profit:

\[ \text{Maximize:} \quad 80H + 50K \]

### Constraints

1. **Floor Space Constraint**: A headset requires 2.5 sq ft, and a keyboard requires 1.5 sq ft. The total available floor space is 200 sq ft.

\[ 2.5H + 1.5K \leq 200 \]

2. **Keyboard Percentage Constraint**: At least 70% of all appliances in stock must be keyboards.

\[ K \geq 0.7(H + K) \]

Simplifying:

\[ 0.3K \geq 0.7H \]

\[ K \geq \frac{7}{3}H \]

3. **Budget Constraint**: The store wants to spend at most $10,000. A headset costs $200, and a keyboard costs $110.

\[ 200H + 110K \leq 10000 \]

4. **Non-Negativity Constraints**: The number of headsets and keyboards cannot be negative.

\[ H \geq 0, K \geq 0 \]

## Gurobi Code

```python
import gurobi

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

    # Decision variables
    H = model.addVar(lb=0, name="Headsets")
    K = model.addVar(lb=0, name="Keyboards")

    # Objective function: Maximize profit
    model.setObjective(80 * H + 50 * K, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(2.5 * H + 1.5 * K <= 200, name="FloorSpace")
    model.addConstr(K >= (7/3) * H, name="KeyboardPercentage")
    model.addConstr(200 * H + 110 * K <= 10000, name="Budget")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal solution: Headsets = {H.varValue}, Keyboards = {K.varValue}")
        print(f"Max Profit: ${model.objVal:.2f}")
    else:
        print("No optimal solution found.")

solve_inventory_problem()
```