## Problem Description and Formulation

The pizza shop has to determine the optimal number of pepperoni and Hawaiian pizzas to sell in order to maximize profit, given certain constraints. Let's denote the number of pepperoni pizzas as \(P\) and the number of Hawaiian pizzas as \(H\).

### Constraints:

1. **Pepperoni Pizzas:** The shop must sell at least 35 pepperoni pizzas but cannot sell more than 40. This can be represented as \(35 \leq P \leq 40\).
2. **Hawaiian Pizzas:** They must sell at least 40 Hawaiian pizzas but cannot sell more than 70. This can be represented as \(40 \leq H \leq 70\).
3. **Total Pizzas:** The total number of pizzas sold cannot exceed 90. This can be represented as \(P + H \leq 90\).

### Objective Function:

The profit per pepperoni pizza is $4, and the profit per Hawaiian pizza is $5. The objective is to maximize the total profit, which can be represented as \(4P + 5H\).

## 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 to solve the problem:

```python
import gurobi as gp
from gurobi import GRB

# Create a new model
model = gp.Model("pizza_shop")

# Define variables
P = model.addVar(lb=35, ub=40, name="pepperoni_pizzas", vtype=GRB.INTEGER)
H = model.addVar(lb=40, ub=70, name="hawaiian_pizzas", vtype=GRB.INTEGER)

# Objective function: Maximize profit
model.setObjective(4 * P + 5 * H, GRB.MAXIMIZE)

# Constraint: Total pizzas cannot exceed 90
model.addConstr(P + H <= 90, name="total_pizzas")

# Solve the model
model.optimize()

# Check if the model is optimized
if model.status == GRB.OPTIMAL:
    print(f"Optimal solution found.")
    print(f"Pepperoni pizzas to sell: {P.varValue}")
    print(f"Hawaiian pizzas to sell: {H.varValue}")
    print(f"Max Profit: ${4 * P.varValue + 5 * H.varValue}")
else:
    print("No optimal solution found.")
```

This code defines the problem as described, sets up the model with Gurobi, and solves it. The solution will indicate how many pepperoni and Hawaiian pizzas the shop should sell to maximize profit under the given constraints.