m=25.0 #weight of water vapour [grams]
w=18.0 #molecular weight of water vapour [grams/mol]
T=9.69 #increase in temperature [K]
Qp=0.45 #heat supplied at constant pressure[KJ]
n=m/w #no. of moles of water vapour
Cp=Qp/(n*T) #specific heat capacity at constant pressure[KJ]
Cp=Cp*1000 #specific heat capacity at constant pressure[J]
print"The specific heat capacity at constant pressure =",round(Cp,2),"J K^-1 mol^-1"
import math
m=16.0 #weight of oxygen [grams]
w=32.0 #molecular weight of oxygen [grams/mol]
T=300.0 #Temperature during compression [K]
P1=1.0 #initial pressure of process [atm]
P2=100.0 #final pressure of process[atm]
R=8.314 #Universal gas constant [J/K/mol]
n=m/w #no. of moles of oxygen
W=-n*R*T*math.log(P1/P2)
print"Mininmum work done to compress oxygen =",round(W),"J(approx)"