#Initialization of variables
sw = 62.4 #specific weight of water at ordinary pressure - lb/ft**3
sw2 = 9.81 #specific weight of water at temperature - kN/m**3
sg = 13.55 #specific weight of mercury
g = 32.2 #ft/s**2
#calculations
dwater = sw/g
dwater2 = sw2/(9.81)
Gmercury = sg*sw
Gmercury2 = sg*sw2
dmercury = sg*dwater
dmercury2 = sg*dwater2
#Results
print 'Density of water = %.2f slugs/ft**3'%(dwater)
print ' Density of water = %.2f g/ml'%(dwater2)
print ' Density of mercury = %.1f slugs/ft**3'%(dmercury)
print ' Density of mercury = %.2f kN/m**3'%(dmercury2)
print ' Specific weight of mercury = %d lb/ft**3'%(Gmercury+1)
print ' Specific weight of mercury = %d kN/m**3'%(Gmercury2+1)
#Initialization of variables
T = 460.+100 #R
P = 15. #psia
MW = 32. #lb
g = 32.2 #ft/s**2
ratio = 0.4
#calculations
R = 49710./32
d = P*144/(R*T)
Gamma = d*g
volume = 1/d
P2 = P*(1/ratio)**1.4
P2f = P2*144
T2 = P2f*ratio/(d*R) -460
P3 = P/ratio
#Results
print ' part a'
print ' Density of oxygen = %.5f slug/ft**3'%(d)
print ' Specific weight of oxygen = %.2f lb/ft**3'%(Gamma)
print ' Specific volume of oxygen = %d ft**3/slug'%(volume+1)
print ' part b'
print ' Final pressure of oxygen = %.1f psia '%(P2)
print ' Final Temperature of oxygen = %d F '%(T2+2)
print ' part 3'
print ' Final pressure of oxygen = %.1f psia '%(P3)
print ' Final Temperature of oxygen = %d F '%(T-460)
#Initialization of variables
P = 600.*1000 #N/m**2
T = 25. #C
M = 71. #Kg
#calculations
R = 8312/M
d = P/(R*(273+T))
Gamma = d*9.81
v = 1/d
# results
print 'Density of chlorine = %.1f kg/m**3'%(d)
print ' Specific weight of chlorine = %d N/m**3'%(Gamma+1)
print ' Specific volume of chlorine = %.3f m**3/Kg'%(v)