## Problem Description and Formulation

The company produces small and large chessboards, with each requiring different amounts of cutting and assembly time. The goal is to maximize profit given the available time for cutting and assembly.

Let's define:
- \(x\) as the number of small chessboards produced,
- \(y\) as the number of large chessboards produced.

The constraints based on the given information are:
1. Cutting time: \(5x + 10y \leq 400\)
2. Assembly time: \(10x + 20y \leq 700\)

The objective function to maximize profit is:
\[P = 4x + 8y\]

Also, \(x \geq 0\) and \(y \geq 0\) since the number of chessboards cannot be negative.

## Converting to Gurobi Code

To solve this linear programming problem using Gurobi, we will use the Gurobi Python interface. 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
m = gp.Model("Chessboard_Production")

# Define variables
x = m.addVar(name="small_chessboards", lb=0, vtype=gp.GRB.CONTINUOUS)
y = m.addVar(name="large_chessboards", lb=0, vtype=gp.GRB.CONTINUOUS)

# Define objective function
m.setObjective(4*x + 8*y, gp.GRB.MAXIMIZE)

# Add constraints
m.addConstr(5*x + 10*y <= 400, name="cutting_time")
m.addConstr(10*x + 20*y <= 700, name="assembly_time")

# Optimize model
m.optimize()

# Print solution
if m.status == gp.GRB.OPTIMAL:
    print("Optimal solution found.")
    print(f"Produce {x.varValue} small chessboards.")
    print(f"Produce {y.varValue} large chessboards.")
    print(f"Max Profit: ${m.objVal:.2f}")
else:
    print("No optimal solution found.")
```

This code defines a Gurobi model for the chessboard production problem, sets up the objective function and constraints, solves the model, and then prints out the optimal production levels for small and large chessboards along with the maximum achievable profit. Note that the `vtype=gp.GRB.CONTINUOUS` argument allows for fractional solutions. If integer solutions are required (which might be the case for producing chessboards), you would change `vtype` to `gp.GRB.INTEGER`.