## Problem Description and Formulation

The problem is a linear programming optimization problem. The goal is to maximize the profit of a winter sports store by determining the optimal number of pairs of skis and snowboards to buy and sell.

### Decision Variables

* \(x\): The number of pairs of skis to buy and sell.
* \(y\): The number of snowboards to buy and sell.

### Objective Function

The profit from selling \(x\) pairs of skis is \(200x\) and from selling \(y\) snowboards is \(175y\). The total profit \(P\) to be maximized is:

\[P = 200x + 175y\]

### Constraints

1. **Budget Constraint**: The total cost of buying \(x\) pairs of skis at $500 each and \(y\) snowboards at $400 each must not exceed $20,000.

\[500x + 400y \leq 20000\]

2. **Skis Sales Constraint**: The store estimates that at least 10 but at most 30 pairs of skis will be sold.

\[10 \leq x \leq 30\]

3. **Snowboards Sales Constraint**: The number of snowboards sold is at most half the number of skis sold.

\[y \leq 0.5x\]

4. **Non-Negativity Constraint**: The number of pairs of skis and snowboards cannot be negative.

\[x \geq 0, y \geq 0\]

Since \(x\) and \(y\) represent the number of items, they must also be integers.

## Gurobi Code

```python
import gurobi

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

    # Define the decision variables
    x = model.addVar(lb=10, ub=30, vtype=gurobi.GRB.INTEGER, name="Skis")
    y = model.addVar(vtype=gurobi.GRB.INTEGER, name="Snowboards")

    # Objective function: Maximize profit
    model.setObjective(200 * x + 175 * y, gurobi.GRB.MAXIMIZE)

    # Budget constraint
    model.addConstr(500 * x + 400 * y <= 20000, name="Budget")

    # Snowboards sales constraint
    model.addConstr(y <= 0.5 * x, name="Snowboards_vs_Skis")

    # Solve the model
    model.optimize()

    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal solution: Skis = {x.varValue}, Snowboards = {y.varValue}")
        print(f"Max Profit: {model.objVal}")
    else:
        print("No optimal solution found.")

solve_ski_and_snowboard_problem()
```

This code defines the optimization problem using Gurobi's Python interface, sets up the objective function and constraints according to the problem description, and solves the model. The solution will provide the optimal number of pairs of skis and snowboards the store should buy and sell to maximize profit.