#Variable declaration
P1=0 #external pressure, atm
Vf1=6 #final volume, L
Vi1=2 #initial volume, L
P2=1.2 #external pressure, atm
Vf2=6 #final volume, L
Vi2=2 #initial volume, L
#Calculation
#(a)
W1=-P1*(Vf1-Vi1) #work in atm.L
#(b)
W2=-P2*(Vf2-Vi2) #work in atm.L
W2=W2*101.3 #work in J
#Result
print"(a).The work done in expansion against vacuum is :",W1,"J\n"
print"(b).The work done in expansion against 1.2 atm pressure is :%.1e"%W2,"J\n"
#Variable declaration
q=-128 #heat transfer from the gas, J
w=462 #work done in compressing the gas, J
#Calculation
deltaE=q+w #change in energy of the gas, J
#Result
print"The change in energy for the process is :",deltaE,"J\n"
#Variable declaration
mSO2=87.9 #mass in g
SO2=64.07 #molar mass in g
#Calculation
nSO2=mSO2/SO2 #moles of SO2
deltaH=-198.2 #heat produced for 2 mol, in kJ/mol
deltaH=deltaH/2 #for one mole SO2,in kJ/mol
Hprod=deltaH*nSO2 #heat produced in this case, in kJ/mol
#Result
print"The heat produced in a reaction is :",round(Hprod),"kJ\n"
#Variable declaration
R=8.314 #gas constant, J/K. mol
T=298 #temp in K
deltaH=-566 #enthalpy change, kJ/mol
deltan=2-3 #change in gas moles
#Calculation
deltaE=deltaH-R*T*deltan/1000.0 #change in internal energy, kJ/mol
#Result
print"The change in internal energy in the reaction is :",round(deltaE,1),"kJ/mol\n"
#Variable declaration
m=466 #mass in g
s=4.184 #specific heat in J/g C
#Calculation
deltaT=74.6-8.5 #change in temp, C/K
q=m*s*deltaT/1000 #amount of heat absorbed, kJ
#Result
print"\t the amount of heat absorbed is :",round(q),"kJ\n"
#Variable declaration
Ccal=10.17 #heat capacity, kJ/C
deltaT=25.95-20.28 #change in temp, C
m=1.435 #mass of naphthalene, g
molm=128.2 #mol mass of naphthalene, g
#Calculation
qcal=Ccal*deltaT
q=-qcal*molm/m #molar heat of combustion of naphthalene, kJ
#Result
print"The molar heat of combustion of naphthalene is :%.3g"%q,"kJ/mol\n"
#Variable declaration
#for water
m=100 #mass, g
s=4.184 #specific heat, J/g C
deltaT=23.17-22.5 #change in temp., C
qH2O=m*s*deltaT #heat gained by water, J
#for lead
qPb=-qH2O #heat lost by lead, J
m=26.47 #mass, g
#Calculation
deltaT=23.17-89.98 #change in temp., C
s=qPb/(m*deltaT) #specific heat, J/g C
#Result
print"The specific heat of lead is :",round(s,3),"J/g C\n"
#Variable declaration
#for water
m=100+100 #mass, g
s=4.184 #specific heat, J/g C
deltaT=25.86-22.5 #change in temp., C
#Calculation
qsoln=m*s*deltaT/1000 #heat gained by water, kJ
qrxn=-qsoln
Hneut=qrxn/(0.5*0.1)
#Result
print"The heat of neutralization is :",round(Hneut,1),"kJ/mol\n"
#Variable declaration
deltaH1=-393.5 #kJ/mol
deltaH2=-285.8 #kJ/mol
deltaH3=-2598.8 #kJ/mol
#Calculation
deltaH4=2*(deltaH1)
deltaH5=(-1.0/2.0)*deltaH3
std_H=deltaH4+deltaH2+deltaH5
#Result
print"Standard enthalpy of formation of acetylene is:",std_H,"kJ/mol"
#Variable declaration
deltaH_Fel=12.4 #Heat of frmtn of Fe(l) in kJ/mol
deltaH_Al2O3=-1669.8 #Heat of formation of Al2O3 in kJ/mol
deltaH_Al=0 #Heat of formation of Al
deltaH_Fe2O3=-822.2 #Heat of formtion of Fe2O3 kJ/mol
M_Al=26.98 #Molar mass of Al
#Calculation
deltaH_rxn=(deltaH_Al2O3+2*deltaH_Fel)-(2*deltaH_Al+deltaH_Fe2O3)
ratio=deltaH_rxn/2.0
heat_released=ratio/M_Al
#Result
print"Heat released per gram of Al is",round(heat_released,2),"kJ/g"