To calculate the entropy for temperature change, we have a slightly different formula than just the heat divided by the temperature. This is because as the heat is flowing the temperature is changing. So we need to integrate (add up) the heat as a function of temperature. The resulting formula for heating at constant pressure (with a constant heat capacity is)
\[\Delta S = n\; C_{\rm m} \ln\left({T_f \over T_i}\right)\]
As we will only consider situations of constant pressure with heat capacities that don't change with temperature, this formula can be used for all of our temperature change situations. Note that the "\(n\;C_{\rm m}\)" part of this equation is just the number of moles times the molar heat capacity - the same thing you use to calculate heat (\(q\)) flow but with \(\Delta T\).