## Problem Description and Formulation

The electronics store needs to determine the optimal number of monitors and gaming stations to stock, given several constraints. Let's define the decision variables:

- \(M\): the number of monitors to stock
- \(G\): the number of gaming stations to stock

The objective is to maximize profit. Given that the profit per monitor sold is $40 and per gaming station sold is $80, the objective function can be written as:

\[ \text{Maximize:} \quad 40M + 80G \]

## Constraints

1. **Floor Space Constraint**: A monitor requires 8 sq ft and a gaming station requires 12 sq ft of floor space. The store has 150 sq ft available.

\[ 8M + 12G \leq 150 \]

2. **Marketing Requirement**: At least 40% of all items in stock must be gaming stations.

\[ G \geq 0.4(M + G) \]

Simplifying this inequality:

\[ G \geq 0.4M + 0.4G \]

\[ 0.6G \geq 0.4M \]

\[ 1.5G \geq M \]

3. **Capital Constraint**: A monitor ties up $180 and a gaming station ties up $260 in capital. The store wants to have a maximum of $4,000 worth of capital tied up.

\[ 180M + 260G \leq 4000 \]

4. **Non-Negativity Constraints**: The number of monitors and gaming stations must be non-negative.

\[ M \geq 0, G \geq 0 \]

## Gurobi Code

```python
import gurobi

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

    # Define the decision variables
    M = model.addVar(lb=0, name="Monitors")
    G = model.addVar(lb=0, name="Gaming_Stations")

    # Objective function: Maximize profit
    model.setObjective(40 * M + 80 * G, gurobi.GRB.MAXIMIZE)

    # Floor space constraint
    model.addConstr(8 * M + 12 * G <= 150, name="Floor_Space")

    # Marketing requirement constraint
    model.addConstr(M - 1.5 * G <= 0, name="Marketing_Requirement")

    # Capital constraint
    model.addConstr(180 * M + 260 * G <= 4000, name="Capital_Constraint")

    # Optimize the model
    model.optimize()

    # Print the status of the optimization
    if model.status == gurobi.GRB.Status.OPTIMAL:
        print("Optimal solution found.")
        print(f"Monitors: {M.varValue}, Gaming Stations: {G.varValue}")
        print(f"Max Profit: {model.objVal}")
    else:
        print("No optimal solution found.")

solve_optimization_problem()
```

This Gurobi code defines the optimization problem as described, with the objective to maximize profit under the given constraints. It then solves the problem and prints out the optimal number of monitors and gaming stations to stock, along with the maximum achievable profit. If no optimal solution is found, it indicates that the problem is infeasible.