What is the formula that relates partial pressure of half-cells and E for the cell?

The formula that relates the partial pressure of half-cells and the standard cell potential (E°) is called the Nernst equation. It can be used to calculate the cell potential under non-standard conditions.

The Nernst equation is given by:
E = E° - ((RT)/(nF)) * ln(Q)

Where:
E is the cell potential under non-standard conditions,
E° is the standard cell potential,
R is the gas constant (8.314 J/(mol·K)),
T is the temperature in Kelvin,
n is the number of moles of electrons transferred in the balanced equation for the cell reaction,
F is Faraday's constant (96485 C/mol),
and ln(Q) is the natural logarithm of the reaction quotient.

The reaction quotient, Q, is determined by the concentrations (or in this case, partial pressures) of the species involved in the cell reaction. It is calculated by taking the product of the reactant concentrations (or partial pressures) raised to the power of their stoichiometric coefficients, divided by the product of the product concentrations (or partial pressures) raised to the power of their stoichiometric coefficients.

To use the Nernst equation, you need to know the standard cell potential (E°) for the specific cell reaction at standard conditions. You also need to know the partial pressures of the reactants and products involved in the half-cells of the cell reaction. Plug these values into the Nernst equation, along with the temperature, and calculate the cell potential (E) under the given non-standard conditions.