#calculate the Joules required
#Initialization of variables
P=1.0132*10**6 #dynes/cm**2
A=100 #cm**2
z=10 #cm
#calculations
w=P*A*z*10**-7
#results
print '%s %.4e %s' %("Joules =",w,"J")
#calculate the Calories required
#Initialization of variables
P=1.0132*10**6 #dynes/cm**2
A=100 #cm**2
z=10 #cm
#calculations
w=P*A*z*10**-7
cal=w/4.184
#results
print '%s %.3f %s' %("Calories =",cal,"cal")
#calculate the Heat of vaporization and the Change in energy
#Initialization of variables
T=373.2 #K
n=1. #mol
qp=9720. #cal/mol
#calculations
q=n*qp
w=1.987*T
dE=q-w
#results
print '%s %d %s' %("Heat of vaporization =",q,"cal")
print '%s %d %s' %("\n Change in energy =",dE,"cal")
#calculate the work done, Heat transferred and change in energy
#Initialization of variables
T1=25+273. #K
T2=25+273. #K
#calculations
print "Since, T2=T1, dE=0"
dE=0
w=0
q=dE+w
#results
print '%s %d %s' %("\n Work done = ",w,"J")
print '%s %d %s' %("\n Heat transferred =",q,"J")
print '%s %d %s' %("\n Change in energy = ",dE,"J")
#calculate the Vibrational energy
#Initialization of variables
R=1.987 #cal/deg mol
#calculations
Cvtr=1.5*R
Cvrot=1.5*R
Cvt=Cvtr+Cvrot
print "Observed Cv= 6.43"
Cvobs=6.43
Cvvib=Cvobs-Cvt
#results
print '%s %.2f %s' %("Vibrational =",Cvvib,"cal/deg mol")