Chapter 2 Gases

Example 2.1,Page no.9

In [1]:
import math
#given
G= 20      #in grams
R= 0.08205 #l−atm/mole K
T= 30      #in Celsius
P= 740     #in mm
M= 44.01 
#CALCULATIONS
V= G*R*(273.15+T)*760/(P*M)
#RESULTS
V=round(V,2)
print 'volume occupied by 20 grams of carbon dioxide=',V,'liter'
volume occupied by 20 grams of carbon dioxide= 11.61 liter

Example 2.2, Page no.9

In [2]:
import math
#given
G= 0.110    #in grams
R= 0.08205  #l−atm /mole K
T= 26.1     #Celsius
P= 743      #in mm
V= 0.0270
#CALCULATIONS
M= G*R*(273.15+T)*760/(P*V)
#RESULTS
M=round(M,2)
print 'molecular weight of hydrocarbon=',M,'g.mole'
molecular weight of hydrocarbon= 102.32 g.mole

Example 2.4,Pg.no.10

In [3]:
import math
#given
R= 0.08205      #l−atm degˆ−1 moleˆ−1
T= 25           #in K
n= 1            #mole
V= 0.5          #liter 
b= 0.04267      #lit moleˆ−1
a= 3.592        #lit ˆ2 atm molˆ−2
#CALCULATIONS
P= R*(273.15+T)/V
P1= (R*(273.15+T)/(V-b))-(a/V**2)
#RESULTS
P=round(P,2)
P1=round(P1,2)
print 'pressure calculated using ideal gas law=',P,'atm'
print 'pressure calculated using vander wals equation=',P1,'atm'
pressure calculated using ideal gas law= 48.93 atm
pressure calculated using vander wals equation= 39.12 atm

Example 2.5,Pg.no.10

In [4]:
import math
#given
T= -88         #in Celsius
Tc= 154.4      #in Kelvin
Pc= 49.7       #pressure in atm
P= 44.7        #pressure in atm
R= 0.08205     #atm mˆ3 moleˆ−1 Kˆ−1
r= 0.8
#CALCULATIONS
V= r*R*(273.15+T)/P
#RESULTS
V=round(V,3)
print 'volume occupied by mole of oxygen=',V,'litre moleˆ−1'
volume occupied by mole of oxygen= 0.272 litre moleˆ−1