To formulate a linear programming (LP) model for Theta Electronics' problem, we need to define variables and constraints that capture the essence of the problem as described. 

Let's denote:
- \(K\) as the number of keyboards to stock,
- \(P\) as the number of PC controllers to stock.

The objective is to maximize profit. Given that the profit per keyboard sold is $20 and the profit per PC controller sold is $10, our objective function can be written as:
\[ \text{Maximize} \quad 20K + 10P \]

Now, let's consider the constraints:

1. **Floor Space Constraint**: The total floor space used by keyboards and PC controllers cannot exceed 200 sq ft.
   - A keyboard requires 12 sq ft of floor space,
   - A PC controller requires 4 sq ft of floor space.
   So, the constraint is: \(12K + 4P \leq 200\).

2. **PC Controllers Percentage Constraint**: At least 35% of all items in stock must be PC controllers.
   This can be represented as: \(P \geq 0.35(K + P)\), which simplifies to \(0.65P \geq 0.35K\) or \(P \geq \frac{7}{13}K\).

3. **Capital Constraint**: The store wants to have a maximum of $5,000 worth of capital tied up at any time.
   - A keyboard ties up $200 in capital,
   - A PC controller ties up $150 in capital.
   So, the constraint is: \(200K + 150P \leq 5000\).

4. **Non-Negativity Constraints**: Since we cannot have a negative number of keyboards or PC controllers in stock, we also have:
   - \(K \geq 0\),
   - \(P \geq 0\).

Now, let's translate these constraints and the objective function into Gurobi code in Python:

```python
from gurobipy import *

# Create a new model
m = Model("Theta_Electronics_Problem")

# Define variables
K = m.addVar(vtype=GRB.INTEGER, name="Keyboards")
P = m.addVar(vtype=GRB.INTEGER, name="PC_Controllers")

# Objective function: Maximize profit
m.setObjective(20*K + 10*P, GRB.MAXIMIZE)

# Constraints
# 1. Floor space constraint
m.addConstr(12*K + 4*P <= 200, "Floor_Space_Constraint")
# 2. PC controllers percentage constraint
m.addConstr(P >= (7/13)*K, "PC_Controllers_Percentage_Constraint")
# 3. Capital constraint
m.addConstr(200*K + 150*P <= 5000, "Capital_Constraint")

# Optimize model
m.optimize()

# Print results
for v in m.getVars():
    print(f"{v.varName}: {v.x}")
print(f"Objective: {m.objVal}")
```

This code defines the optimization problem as described and solves it using Gurobi. It prints out the optimal number of keyboards and PC controllers to stock, along with the maximum profit achievable under the given constraints.