Chapter 5:Gases

Example no:5.1,Page no:177

In [40]:
#Variable declaration
Pbaro=688 #pressure in mm Hg

#Calculation
Patm=Pbaro/760.0 #pressure in atm

#Result
print"The presuure in atmospheres is :",round(Patm,3),"atm\n"
The presuure in atmospheres is : 0.905 atm

Example no:5.2,Page no:178

In [41]:
#Variable declaration
Pbaro=732 #pressure in mm Hg

#Calculation
Patm=Pbaro/760.0 #pressure in atm
P=Patm*1.01325*10**2 #pressure in kilo Pascal

#Result
print"The presuure in kilo pascals is :",round(P,1),"kPa\n"
The presuure in kilo pascals is : 97.6 kPa

Example no:5.3,Page no:186

In [42]:
#Variable declaration
V=5.43 #volume, L
t=69.5 #temperature, C

#Calculation
T=t+273 #temperature, K
n=1.82 #moles
R=0.0821 #universal gas constant, L.atm/(K.mol)
P=n*R*T/V #pressure, atm

#Result
print"The presuure in atmospheres is :",round(P,2),"atm\n"
The presuure in atmospheres is : 9.42 atm

Example no:5.4,Page no:187

In [43]:
#Variable declaration
m=7.4 #mass of NH3, g
#at STP for NH3 for 1mole of NH3
V1=22.41 # volume, L
NH3=17.03 #molar mass of NH3, g

#Calculation
n=m/NH3 #moles of NH3
V=n*V1 #volume, L

#Result
print"The volume of NH3 under given conditions is :",round(V,2),"L\n"
The volume of NH3 under given conditions is : 9.74 L

Example no:5.5,Page no:188

In [44]:
#Variable declaration
V1=0.55 #volume, L
P1=1 #pressure at sea level, atm
P2=0.4 #pressurea at 6.5km height, atm

#n1=n2 and T1=T2 given hence P1V1=P2V2
#Calculation
V2=P1*V1/P2 

#Result
print"The volume of He balloon at height 6.5km above sea level is :",round(V2,1),"L\n"
The volume of He balloon at height 6.5km above sea level is : 1.4 L

Example no:5.6,Page no:189

In [45]:
#Variable declaration
P1=1.2 # pressure initial, atm
T1=18+273 #temperature initial, K
T2=85+273 #temperature final, K
#volume is constant

#Calculation
P2=P1*T2/T1 # pressure final,atm

#Result
print"The final pressure is :",round(P2,2),"atm\n"
The final pressure is : 1.48 atm

Example no:5.7,Page no:189

In [46]:
#Variable declaration
P1=6.4 # pressure initial, atm
P2=1.0 # pressure final, atm
T1=8+273 #temperature initial, K
T2=25+273 #temperature final, K
V1=2.1 #volume initial, mL

#Calculation
V2=P1*V1*T2/(T1*P2) # volume final, mL

#Result
print"The final volume is :",round(V2),"mL\n"
The final volume is : 14.0 mL

Example no:5.8,Page no:191

In [47]:
#Variable declaration

#taking 1 mole of CO2
n=1 
R=0.0821 #universal gas constant, L. atm/K.mol
t=55 #temperature, C
T=t+273 #temperature, K
P=0.99 #.pressure, atm
M=44.01 #molar mass of CO2, g

#Calculation
d1=P*M/(R*T) #density of CO2, g/L
#altenate method
#taking 1 mole of CO2
mass=M #mass of CO2 in g =mol mass since we are considering 1 mole of CO2
V=n*R*T/P #volume, L
d2=mass/V #density=mass/volume, g/L

#Result
print"The density of CO2 is :",round(d1,2),"g/L\n"
print"(Alternate Method)the density of CO2 is :",round(d2,2),"g/L\n"
The density of CO2 is : 1.62 g/L

(Alternate Method)the density of CO2 is : 1.62 g/L

Example no:5.9,Page no:192

In [49]:
#Variable declaration
d=7.71 # density, g/mL(given)
R=0.0821 #universal gas constant, L. atm/K.mol
T=36+273 # temp, K
P=2.88 #pressure, atm

#Calculation
M1=d*R*T/P # mol. mass, g/mol
#alternate method
#considering 1 L of compound
V=1 #volume, L
n=P*V/(R*T) #no of moles
m=7.71 #mass per 1 L, g
M2=m/n # mol. mass, g/mol

#Result
print"The molecular mass of given compound is :",round(M1,1),"g/mol\n"
print"{alternate method} the molecular mass of given compound is :",round(M2,1)," g/mol\n" 
print"The molecular formula can be only found by trial and error method as given in the book \n"
The molecular mass of given compound is : 67.9 g/mol

{alternate method} the molecular mass of given compound is : 67.9  g/mol

The molecular formula can be only found by trial and error method as given in the book 

Example no:5.10,Page no:193

In [57]:
#Variable declaration
percentSi=33 #percent of Si in compound
percentF=67 #percent of F in compound
P=1.7 #pressure, atm
T=35+273 #temp. in K
m=2.38 #mass, g
V=0.21 #volume, L
R=0.0821 #universal Gas constant, L.atm/K.mol
m_sif3=85.09

#Calculation
nSi=percentSi/28.01 #moles of Si in 100g compound
nF=percentF/19 #moles of F in 100g compound
n=P*V/(R*T) #moles
M=m/n #mol. mass=mass/moles, g/mol
e=M/m_sif3

#Result
print"The molecular mass of given compound is :",round(M),"g/mol\n"
print"Therefore,molecular formula is (SiF3)%.f"%round(e),"OR Si2F6"
The molecular mass of given compound is : 169.0 g/mol

Therefore,molecular formula is (SiF3)2 OR Si2F6

Example no:5.11,Page no:194

In [35]:
#Variable declaration
VC2H2=7.64 #volume of acetylene, L

#Calculation
VO2=VC2H2*5/2.0 #volume of O2 required for complete combustion as 5mol O2 react with 2mol acetylene for complete combustion

#Result
print"The volume of O2 required for complete combustion of acetylene is :",VO2,"L\n"
The volume of O2 required for complete combustion of acetylene is : 19.1 L

Example no:5.12,Page no:195

In [61]:
#Variable declaration
R=0.0821 #universal Gas constant, L.atm/K.mol
T=80+273 #temp in K
P=823/760.0 #pressure in atm
m=60.0 #mass of NaN3, g
NaN3=65.02 #mol. mass of NaN3, g

#Calculation
nN2=m*3.0/(2.0*NaN3) #moles of N2
nN2=round(nN2,2)
VN2=nN2*R*T/P #from ideal gas law
#Result
print"\t the volume of N2 generated is :",round(VN2,1),"L\n"
	 the volume of N2 generated is : 36.9 L

Example no:5.13,Page no:196

In [64]:
#Variable declaration
R=0.0821 #universal Gas constant, L.atm/K.mol
T=312 #temp in K
V=2.4*10**5 #volume, L
P1=7.9*10**-3 #pressure initial in atm
P2=1.2*10**-4 #pressure final in atm

#Calculation
Pdrop=P1-P2 #pressure drop, atm
n=Pdrop*V/(R*T) #moles of Co2 reacted
Li2CO3=73.89 #mol. mass of Li2CO3, g
mLi2CO3=n*Li2CO3 #mass of Li2CO3, g


#Result
print"The mass of Li2CO3 formed is :%.1e"%mLi2CO3,"g Li2CO3\n"
The mass of Li2CO3 formed is :5.4e+03 g Li2CO3

Example no:5.14,Page no:199

In [70]:
#Variable declaration
nNe=4.46 #moles of Ne
nXe=2.15 #moles of Xe
nAr=0.74 #moles of Ar
PT=2 #total pressure in atm

#Calculation
XNe=nNe/(nNe+nAr+nXe) #mole fraction of Ne
XAr=nAr/(nNe+nAr+nXe) #mole fraction of Ar
XXe=nXe/(nNe+nAr+nXe) #mole fraction of Xe
PNe=XNe*PT #partial pressure of Ne
PAr=XAr*PT #partial pressure of Ar
PXe=XXe*PT #partial pressure of Xe

#Result
print"The partial pressures of Ne, Ar and Xe are:"
print"PNe=",round(PNe,2),"atm\n","PAr=",round(PAr,2),"atm\nPXe=",round(PXe,3),"atm "
The partial pressures of Ne, Ar and Xe are:
PNe= 1.21 atm
PAr= 0.2 atm
PXe= 0.585 atm 

Example no:5.15,Page no:200

In [71]:
#Variable declaration
PT=762 #pressure total, mmHg
PH2O=22.4 #pressure of water vapor, mmHg
PO2=PT-PH2O #pressure of O2, frm Dalton's law, mmHg
M=32 #mol mass of O2, g
R=0.0821 #universal Gas constant, L.atm/K.mol
T=24+273 #temp in K
V=0.128 #volume in L

#Calculation
m=(PO2/760)*V*M/(R*T) #mass of mass of O2 collected, g

#Result
print"The mass of O2 collected is :",round(m,3),"g\n"
The mass of O2 collected is : 0.163 g

Example no:5.16,Page no:207

In [1]:
#Variable declaration
R=8.314 #universal Gas constant, J/K mol
T=25+273 #temp in K
import math
#Calculation
#for O2
M=4.003*10**-3 #mol mass in kg
Urms=math.sqrt(3*R*T/M) #rms velocity, m/s
print"\t the rms velocity of O2 collected is :%.2e"%Urms,"m/s\n"
#for N2
M=28.02*10**-3 #mol mass in kg
Urms=math.sqrt(3*R*T/M) #rms velocity, m/s

#Result
print"\t the rms velocity of N2 collected is :",round(Urms)," m/s\n"
	 the rms velocity of O2 collected is :1.36e+03 m/s

	 the rms velocity of N2 collected is : 515.0  m/s

Example no:5.17,Page no:209

In [76]:
#Variable declaration
t2=1.5 #diffusion time of compound, min
t1=4.73 #diffusion time of Br, min
M2=159.8 #mol mass of Br gas, g

#Calculation
M=(t2/t1)**2*M2 #molar gas of unknown gas, g(from Graham's Law of Diffusion)

#Result
print"\t the molar mass of unknown gas is :",round(M,1),"g/mol\n"
	 the molar mass of unknown gas is : 16.1 g/mol

Example no:5.18,Page no:213

In [80]:
#Variable declaration
#(a)
V=5.2 #volume, L
T=47+273 
n=3.5 
R=0.0821 #universal Gas constant, L.atm/K.mol

#Calculation
P=n*R*T/V 
print"The pressure of NH3 gas from ideal gas equation is :",round(P,1),"atm\n"
#(b)
a=4.17 #constant, atm.L2/mol2
b=0.0371 #constant, L/mol
Pc=a*n**2/V**2 #pressure correction term, atm
Vc=n*b #volume correction term, L
P=n*R*T/(V-Vc)-Pc #from van der waals equation, pressure, atm

#Result
print"The pressure of NH3 gas from van der waals equation is :",round(P,1),"atm\n" 
The pressure of NH3 gas from ideal gas equation is : 17.7 atm

The pressure of NH3 gas from van der waals equation is : 16.2 atm