## Problem Description and Formulation

The farmer has 50 acres of land to allocate between growing lettuce and spinach. The goal is to maximize profit given the constraints on watering costs and picking time.

### Variables
- Let \(L\) be the number of acres for lettuce.
- Let \(S\) be the number of acres for spinach.

### Objective Function
The profit per acre of lettuce is $50, and the profit per acre of spinach is $55. The objective is to maximize the total profit \(P\):
\[ P = 50L + 55S \]

### Constraints
1. **Land Constraint**: The farmer has 50 acres of land.
\[ L + S \leq 50 \]

2. **Watering Costs Constraint**: The cost for lettuce is $10 per acre, and for spinach, it is $12 per acre, with a total budget of $5000.
\[ 10L + 12S \leq 5000 \]

3. **Picking Time Constraint**: Lettuce takes 2 days per acre, and spinach takes 1 day per acre, with a total of 300 days available.
\[ 2L + S \leq 300 \]

4. **Non-Negativity Constraint**: The acres for lettuce and spinach cannot be negative.
\[ L \geq 0, S \geq 0 \]

## Gurobi Code

```python
import gurobi

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

    # Define variables
    L = model.addVar(lb=0, name="Lettuce_Acres")
    S = model.addVar(lb=0, name="Spinach_Acres")

    # Objective function: Maximize profit
    model.setObjective(50*L + 55*S, gurobi.GRB.MAXIMIZE)

    # Land constraint
    model.addConstr(L + S <= 50, name="Land_Constraint")

    # Watering costs constraint
    model.addConstr(10*L + 12*S <= 5000, name="Watering_Costs_Constraint")

    # Picking time constraint
    model.addConstr(2*L + S <= 300, name="Picking_Time_Constraint")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal acres for Lettuce: {L.varValue}")
        print(f"Optimal acres for Spinach: {S.varValue}")
        print(f"Max Profit: {model.objVal}")
    else:
        print("The problem is infeasible")

solve_farmers_problem()
```