## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The leather shop wants to maximize its profits by producing the optimal number of wallets and purses given the constraints on cutting and stitching time.

Let's define the decision variables:

* $w$ = number of wallets produced
* $p$ = number of purses produced

The objective function is to maximize the total profit:

* Maximize $50w + 100p$

The constraints are:

* Cutting time: $10w + 15p \leq 500$
* Stitching time: $20w + 30p \leq 600$
* Non-negativity: $w \geq 0, p \geq 0$

## Gurobi Code

```python
import gurobi

# Create a new model
model = gurobi.Model()

# Define the decision variables
w = model.addVar(lb=0, name="wallet")
p = model.addVar(lb=0, name="purse")

# Define the objective function
model.setObjective(50 * w + 100 * p, gurobi.GRB.MAXIMIZE)

# Define the constraints
model.addConstr(10 * w + 15 * p <= 500, name="cutting_time")
model.addConstr(20 * w + 30 * p <= 600, name="stitching_time")

# Optimize the model
model.optimize()

# Print the solution
if model.status == gurobi.GRB.OPTIMAL:
    print("Optimal solution found.")
    print(f"Number of wallets: {w.varValue}")
    print(f"Number of purses: {p.varValue}")
    print(f"Max profit: {model.objVal}")
else:
    print("No optimal solution found.")
```

This code defines the decision variables, objective function, and constraints, and then solves the model using Gurobi's optimization algorithm. If an optimal solution is found, it prints the number of wallets and purses to produce and the maximum profit. Otherwise, it indicates that no optimal solution was found.