In [51]:

```
P=760;#pressure of 14g of nitrogen in mm of Hg#
V=22.4;#Volume occupied by 14g of Nitrogen in litres#
P1=380;#changed pressure of 14g of nitrogen in mm of Hg#
V1=(P*V)/P1;#changed volume of 14g of nitrogen at 380mm pressure in litres#
print'Volume of 14g of Nitrogen at 380 mm Hg pressure=V1=litres',V1
V2=5.6;#changed volume of 14g of nitrogen in litres#
P2=(P*V)/V2;#Pressure of 14g of nitrogen of volume 5.6litres#
print'\nPressure of 14g of Nitrogen of volume 5.6litres=P2=mm Hg',P2
```

In [52]:

```
V=5.6;#Volume occupied by 8g of Oxygen at 0 C in litres#
T=273;#Temperature at which 8g of Oxygen occupies 5.6litres in Kelvin#
V1=11.2;#Changed volume of 8g of Oxygen in litres#
T1=(V1*T)/V;#Temperature at which 8g of Oxygen occupies 11.6litres in kelvin#
print'Temperature of 8g of Oxygen Occupying 11.6litres=T1=Kelvin=273degrees',T1
```

In [53]:

```
P=380.;#pressure of 11g of CO2 at 273K in mm of Hg#
T=273.;#Initial temperature of 11g of CO2 in kelvin#
V=11.2;#Volume occupied by 11g of CO2 in litres at 273K#
P1=760.;#changed pressure of 11g of CO2 at 546K in mm of Hg#
T1=546.;#Final temperature of 11g of CO2 in kelvin#
V1=(P*V*T1)/(T*P1);#changed volume of 11g of CO2 at 760mm pressure in litres#
print'Volume of 11g of CO2 at 760 mm Hg pressure at 546K=V1=litres',V1
```

In [54]:

```
P=570./760.;#pressure of 10L of H2 at 300K in Atmospheres#
T=300.;#Temperature of 10L of H2 in kelvin#
V=10.;#Volume occupied by H2 at 300K in litres#
R=0.082;#Value of R in litre-atmospheres#
n=(P*V)/(R*T);#Number of moles of hydrogen present#
print'Number of moles of Hydrogen present=n=mol',round(n,3)
```

In [55]:

```
TP=746.;#Total pressure of gas at 298K in mm of Hg#
PP=24.;#Partial pressure of Water vapour at 298K in mm of Hg#
PPG=TP-PP;#partial pressure of gas at 298K in mm of Hg#
print'partial pressure of dry gas at 298k=mm of Hg',PPG
V=200.;#Volume occupied by gas at 298K in millilitres#
P1=760.;
V1=(PPG*V)/P1;#Volume of dry gas at a pressure of 760mm Hg#
print'\nVolume of dry gas at pressure 760mm of Hg=V1=ml',V1
```

In [56]:

```
mA=0.11;#amount of gas A in grams#
MWA=44;#Molecular weight of gas A in grams#
nA=mA/MWA;#No. of moles of gas A#
print'No. of moles of gas A=nA=mol',nA
mB=0.17;#amount of gas B in grams#
MWB=34;#Molecular weight of gas B in grams#
nB=mB/MWB;#No. of moles of gas B#
print'\nNo. of moles of gas B=nB=mol',nB
MFA=nA/(nA+nB);#mole fraction of gas A#
print'\nmole fraction of gas A=MFA=',MFA
MFB=nB/(nA+nB);#mole fraction of gas B#
print'\nmole fraction of gas B=MFB=',MFB
PPA=MFA*759;#Partial pressure of gas A#
print'\nPartial pressure of gas A=PPA=mm of Hg',PPA
PPB=MFB*759;#Partial pressure of gas B#
print'\nPartial pressure of gas B=PPB=mm of Hg',PPB
```

In [57]:

```
P1=0.3;#pressure of gas A in atm#
VA=50.;#volume of gas A in ml#
V=500.;#Volume of vessel in ml#
PA=P1*VA/V;#Pressure of gas A in vessel#
print'Pressure of gas A in vessel=PA=atm',PA
P2=0.4;#pressure of gas B in atm#
VB=250.;#volume of gas B in ml#
PB=P2*VB/V;#Pressure of gas A in vessel#
print'\nPressure of gas B in vessel=PB=atm',PB
P=PA+PB;#Total pressure in vessel in atm#
print'\nTotal pressure in vessel=P=atm',P
```

In [58]:

```
print'The volume of 1 mole of H2 at 1 atm and 273.15K=22.415Litres'
print'\nThe volume at 0.5atm is obtained by considering the constancy of PV'
P1=1;
V1=22.415;
P2=0.5;
V2=(P1*V1)/P2;#Volume at 0.5atm in litres#
print'\nVolume at 0.5atm of H2 at 273.15K=V2=Litres',V2
MH2=2;#molecular weight of H2#
DH2=MH2/V2;#density of H2 in gram per litre#
print'\nDensity of H2=DH2=gram per litre',round(DH2,4)
```

In [59]:

```
print'One mole of H2 Occupies 22.415Litres at 273.15K'
print'\nThe volume at 300K is obtained by considering the constancy of V/T'
T1=273.15;
V1=22.415;
T2=300.15;
V2=(V1/T1)*T2;#Volume at 300K in litres#
print'\nVolume of 1mole of H2 at 300.15K=V2=Litres',V2
MH2=2;#molecular weight of H2#
DH2=MH2/V2;#density of H2 in gram per litre#
print'\nDensity of H2=DH2=gram per litre',DH2
```

In [60]:

```
print'Density is proportional to molecular weight'
print'\nRelative density of O2 with respect to H2 is 32/2=16.'
t1=12.;#time for certain volume of gas to stream through hole in mins#
p2=16.;#Relative density of O2 w.r.t H2#
t2=15.;#time for same volume(as gas) of oxygen to stream through hole in mins#
p1=((t1/t2)**2)*p2;#according to graham's law#
print'\nRealtive density of gas to oxygen=p1=',p1#here the answer given in textbook is wrongly printed the actual answer is the one we got here through execution#
```

In [61]:

```
from math import sqrt,pi
T=320;#47C in kelvin#
R=8.31*10**7;#Universal gas constant in erg per degree per mole#
M=32;#molecular weight of O2 in gram per mole#
C2=(3*R*T)/M;#mean square velocity of Oxygen in (cm/sec)^2#
Crms=sqrt(C2);#Root mean square velocity of Oxygen in cm/sec#
print 'Root mean square velocity of Oxygen=Crms=cm/sec',Crms
Cm=sqrt(8*R*T/(pi*M));#mean velocity of Oxygen in cm/sec#
print '\nMean velocity of Oxygen=Cm=cm/sec',Cm
Cmpv=sqrt(2*R*T/M);#mean probable velocity in cm/sec#
print '\nMean probable velocity of Oxygen=Cmpv=cm/sec',round(Cmpv)#in textbook in Cmpv value it is misprinted as 10^9 but it is actually 10^4#
```

In [62]:

```
P=10**6;#pressure of gas in dyn per cm^2#
p=0.00333;#density of gas in gram per cm^3#
C2=3*P/p;#mean square velocity of gas in (cm/sec)^2#
Crms=(C2)**0.5;#Root mean square velocity of Oxygen in cm/sec#
print 'Root mean square velocity of Gas=Crms=cm/sec',Crms
Cm=Crms/1.085;#mean velocity of Gas in cm/sec#
print '\nMean velocity of Oxygen=Cm=cm/sec',Cm
Cmpv=Cm/1.128;#mean probable velocity in cm/sec#
print '\nMean probable velocity of Oxygen=Cmpv=cm/sec',round(Cmpv)
```

In [63]:

```
print'Mean free path is inversely proportional to N which is proportional to pressure'
L1=5.8*10**-6;#mean free path of N2 at NTP in cm#
K=58;#preesure is raised 58 times so factor is 58#
L2=L1/K;#mean free path of N2 at 58atm pressure in cm#
print'\nMean free path of N2 at 58atm pressure=1*10^-7cm'
```

In [64]:

```
from math import pi,sqrt
T=273;#temperature 0C in kelvin#
R=8.31*10**7;#Universal gas constant in erg per degree per mole#
M=28;#molecular weight of N2 in gram per mole#
print'Since 22.4Litres of Nitrogen gas at 0C and 1atm pressure will contain 6.023*10**23Molecules.'
N=2.69*10**19;#no. of molecules in molecules per cm**3#
G=3.78*10**-8;#collision diameter in cm#
K=sqrt(pi*R*T/M);
Z11=2*N**2*G**2*K;#number of collisions per second of Nitrogen at 0C and 1atm#
print'\nNumber of molecular collisions per second of Nitrogen at 0C and 1atm==10.43*10**28molecular collisions per sec per cm**3',Z11
```

In [65]:

```
from math import sqrt,pi
T=273.;#temperature 0C in kelvin#
R=8.31*10**7;#Universal gas constant in erg per degree per mole#
M=28.;#molecular weight of N2 in gram per mole#
print'Since 22.4Litres of Nitrogen gas at 0C and 1atm pressure will contain 6.023*10**23Molecules.'
N=2.69*10**19;#no. of molecules in molecules per cm**3#
Cm=sqrt(8*R*T/(pi*M));#mean velocity of Nitrogen in cm/sec#
print'\nMean velocity of Nitrogen=Cm=cm/sec',Cm
V=22400.;#volume of nitrogen in cm**3#
p=M/V;#Density of nitrogen in gram per cm**3#
print'\nDensity of Nitrogen=p==1.25*10**-3gram per cm**3',p
n=10.99*10**-5;#Viscosity of N2 in poise#
L=(3*n)/(Cm*p);#mean free path of nitrogen in cm#
print'\nMean free path of Nitrogen=L=5.81*10**-6cm'
G=sqrt(1/(1.414*pi*L*N));#Collision diameter of Nitrogen in cm#
print'\nCollission diameter of Nitrogen=G=3.80*10**-8cm'
K=sqrt(pi*R*T/M);
Z11=2*N**2*G**2*K;#number of collisions per second of Nitrogen at 0C and 1atm#
print'\nNumber of molecular collisions per second of Nitrogen at NTP==10.52*10**28molecular collisions per sec per cm**3',round(Z11,3)
```

In [66]:

```
T1=27;#initial temperature in C#
T2=177;#final temperature in C#
print'NH3 being a nonlinear molecule has 3 translational,3 rotational and 6 vibrational degrees of freedom.'
print'\nCv=3*0.5*R+3*0.5*R+6*R=9*R'
Cv=18;#Molar heat capacity in cal per deg per mol#
dU=Cv*(T2-T1);#Change in internal energy of a mole in cal per mole#
print'\nChange in internal energy of a mole of NH3=dU=cal per mole',dU
print'\nThe actual increase in energy may not be 2700cal per mol\nbecause at the given temperature,none or only some of the vibrational degrees of freedom may be contributing to the total energy.'#answer should come as 2700 not 2400,it was just misprinted#
```

In [67]:

```
print'CH4 being a nonlinear molecule has 3 translational,3 rotational and 9 vibrational degrees of freedom.'
print'\nCv=3*0.5*R+3*0.5*R+9*R=12*R'
Cv=24;#Molar heat capacity in cal per degree per mol#
print'\nActual Cv is 16cal per degree per mol'
R=2;
Cvr=16-R;#Real molar heat capapcity in cal per degree per mole#
print'\nReal molar heat capapcity of a mole of CH4=Cvr=cal per degree per mole',Cvr
print'\nThe Real molar heat capacity at constant volume is 10cal less than the theoretical value.\nSince each vibrational degree of freedom can contribute 2cal,this means that 5 vibrational degrees\nare not contributing at the given temperature.'
```

In [68]:

```
a=3.60;#Van der Waals constant for CO2 in L^2 atm per mol^2#
b=4.30*10**-2;#Van der Waals constant for CO2 in litre per mol#
N=300.;#No. of moles of CO2 the cylinder contains#
V=100.;#volume of cylinder in litres#
P=150.;#Maximum pressure the cylinder can withstand in atm#
R=0.082;
K1=P+(N**2*a/V**2);
K2=V-(N*b);
T=(K1*K2)/(N*R);#The lowest temperature at which cylinder can explode in Kelvin#
print'The lowest temperature at which cylinder can explode=T=K',round(T,1)
```

In [69]:

```
from math import pi
tA=280.;#time of flow for liquid A in seconds#
tB=200.;#time of flow for liquid B in seconds#
pA=1.;#density of liquid A in gram per cm**3#
pB=1.1;#density of liquid B in gram per cm**3#
h=10.;#height of liquid responsible for the flow in cm#
g=980.;#gravity constant in dyns#
V=1.;#volume of liquid in ml#
L=10.;#length of the capillary in cm#
r=0.1;#radius of the capillary in cm#
PA=h*pA*g;#Pressure of liquid A#
PB=h*pB*g;#Pressure of liquid B#
nA=(pi*PA*tA*r**4)/(8*L*V);#Viscosity of Liquid A in centipoise#
print'\nViscosity of Liquid A=nA=centipoise',round(nA,1)
nB=(pi*PB*tB*r**4)/(8*L*V);#Viscosity of Liquid B in centipoise#
print'\nViscosity of Liquid B=nB=centipoise',round(nB,1)
```

In [70]:

```
ST=520.;#surface tension of mercury in dyn per cm#
d=13.6;#density of mercury in gram per cm**3#
g=980.;#gravity constant in dyns#
r=0.1;#radius of the capillary tube in cm#
h=(ST*2)/(g*r*d);#Depression observed in capillary tube in cm#
print'Depression observed in capillary tube=h=cm',round(h,3)#the answer is given wrong in textbook,it should actually be double the one given#
```

In [71]:

```
T=293.;#temperature 20C in kelvin#
R=8.31*10**7;#Universal gas constant in erg per degree per mole#
dr=165.;#Change of surface tension in erg per cm^2 per mol litre#
C=0.06;#concentration we are considering in M#
t=(C*dr)/(R*T);#surface excess concentration of phenol in mol per cm^2#
print'surface excess concentration of phenol=mol per cm^2',t
```

In [72]:

```
M=256;#Molecular weight of acid in grams#
w=2.56*10**-5;#weight of palmitic acid in grams#
N=w/M;#No. of molecules of acid#
A=123.;#Total area occupied in cm^2#
AM=A/N;#Area per molecule in cm^2#
print'Area per molecule=20.4*10^-16cm^2.\nThis is the area of crosssection A for a vertical position.'
V=w/0.81;#Volume of acid in cm^3#
VM=V/N;#Volume of one molecule of acid in cm^3#
L=VM/AM;#Length of molecule in cm#
print'\nLength of a molecule=',L
```

In [73]:

```
T=298.;#Temperature in kelvin#
ST=0.2;#Lowered surface tension in dyn per cm#
K=1.37*10**-16;#Boltzman's constant#
AM=(K*T)/ST;#Area per molecule on the surface in cm**2#
A=300.;#Total area occupied in cm**2#
N=A/AM;#no. of molecules#
W=3*10**-7;#weight of insoluble substance in grams#
w=W/N;#weight of one molecule in grams#
N1=6.023*10**23;
MW=w*N1;#Molecular weight of substance in grams#
print'Molecular weight of substance=MW==123',MW
```

In [74]:

```
MW=461.;#molecular weight of lead iodide in grams#
CR1=3000.;#initial count rate in count per minute#
CR2=900.;#final count rate in count per minute#
CR=CR1-CR2;
print'The count for lead iodide as absorbed=CR=%fcount per minute',CR
print'\nThe ratio of weights of lead iodide and radio lead iodide in solution is equal to that of the same ratio on surface'
print'\nWeight of lead iodide in solution=0.0014grams'
print'\nWeight of radio lead iodide is proportional to the count.\nWeight of lead iodide on the surface=0.0014*21/9.\nMolecular weight of lead iodide=461.\nArea of the surface per gram=4266cm**2 g**-1'
```

In [75]:

```
print'From the linear plot of the langmuir isotherm the intercept Xm=1/0.19=5.26milligrams'
Xm=5.26*10**-3;
print'\nThis is the weight of N2 that forms a unimolecular layer of 2g charcoal.'
MW=28;#molecular weight of N2#
N=Xm*6.023*10**23/MW;#No. of molecules of N2#
TA=N*16*10**-16;#Total area in cm**2#
A=TA/2;#Area per gram in cm**2#
print'\nArea of N2 per gram=cm**2',round(A)
```

In [76]:

```
print'From the linear plot of the langmuir isotherm the intercept=0.35*10**-3 and slope=9.47*10**-2'
print'\nVolume is the inverse of summation of intercept and slope and that is 10.52cc'
Vm=10.52;#volume in cc#
m=Vm/22400;#No. of moles of N2#
N=m*6.023*10**23;#No. of molecules of N2#
TA=N*16*10**-16;#Total area in cm**2#
A=TA/17.5;#Area per gram in cm**2#
print'\nArea of N2 per gram=cm**2',round(A)
```

In [77]:

```
d=13.56;#density of mercury in gr per cm**3#
V=1/d;#Volume of mercury in cm**3#
D=0.07*10**-4;#Diameter of the globule in cm#
r=D/2;#radius of globule in cm#
print'One globule of mercury occpies a volume of 1.33*3.14*r**3cm**3\nSurface area of one globule=4*3.14*r**2'
Vg=1.33*3.14*r**3;#volume of one globule in cm**3#
y=0.0738/Vg;#No of globules in 0.0738 volume#
print'\nNo. of globules in 0.0738cm**3=y=',y
SA=y*4*3.14*r**2;#Surface area of y globules in cm**2#
print'\nSurface area of y globules=SA=cm**2',round(SA)
```

In [78]:

```
from math import pi,log
T=300;#temperature in kelvin#
R=8.31*10**7;#Universal gas constant in ergs#
r=2*10**-5;#average radius of particles in cm#
h=4.15*10**-3;#Vertical seperation in cm#
p=1.21;#density of latex in gram per cm**3#
g=980;#gravity constant in dynes#
print'Since the dispersion medium is water its density is p1=1.\nwhen the system equilibrated average number of colloidal particles seen in the field is halved so N0/N=2.\nthe required expression is derived based on kinetic energy of particles'
p1=1;#density of water#
L=log(2)*0.75*(R*T)/(pi*g*h*(p-p1)*r**3);
print'\nValue of Avagadro number is L==6.037*10**23molecules per mol.',round(L,2)
```

In [79]:

```
Vf=117.857*10**-9;#Volume falling within field of view in ml#
AN=9.66;#Average no. of particles per count#
N=AN/Vf;#No. of particles per count#
print'No .of particles per ml=N=',N
W=1.5*10**-7;#Weight of iron oxide per ml#
w=W/N;#weight of one particle in grams#
print'\nWeight of one particle=w=1.83*10**-15grams'
d=5.2;#density of iron oxide in g per cm**3#
V=w/d;#Volume of one particle in cm**3#
print'\nVolume of one particle=V=3.52*10**-16cm**3'
R=2.032*10**-5;#radius of particle in cm#
print'Radius of particle=R=\nDiameter of particle=',r,d
```

In [80]:

```
from math import pi
D=78.;#dielectric constant#
V=0.009;#viscosity of suspension in dyn sec per cm**2#
P=3.2;#potential gradient in volt per cm#
t=38.2;
d=0.033;#standard distance between electrodes in cm#
u=90000.;
EP=(4*pi*V*u*d)/(D*t*P);#Electrokinetic potential of the catalyst in volts#
print'Electrokinetic potential of the catalyst=EP=volts',round(EP,4)
```

In [81]:

```
from math import pi
D=80.36;#dielectric constant#
V=0.01;#viscosity of suspension in dyn sec per cm**2#
P=10;#potential gradient in volt per cm#
v=3*10**-3;#observed velocity in cm per sec#
u=90000;
EP=(4*pi*V*u*v)/(D*P);#Zeta potential of the catalyst in volts#
print'Zeta potential of the catalyst=EP=volts',EP
print'\nThe effective thickness of the double layer can be taken to be 1cm'
e=9*10**-4;
r=0.5*10**-4;
N=4*pi*e*r**2;#total no. of charges carried by a particle#
print'\nTotal no. of charges carried by a particle=N=',N
```

In [82]:

```
from math import pi
D=80.36;#dielectric constant#
V=0.01;#viscosity of suspension in dyn sec per cm**2#
P=100;#potential gradient in volt per cm#
u=90000;
EP=0.03;#Electrokinetic potential of the catalyst in volts#
FW=(P*EP*D*3600)/(4*pi*V*u);#amount of flow of water in cm per hour#
print'Amount of flow of water through diaphragm=FW=cm per hour',round(FW,1)
```

In [83]:

```
D=80.36;#dielectric constant#
V=0.01;#viscosity of suspension in dyn sec per cm^2#
P=40;#potential gradient in volt per cm#
r=0.05;#radius of capillary in cm#
u=90000;
ZP=0.05;#Zeta potential of the catalyst in volts#
FW=(P*ZP*D*3600*r**2)/(4*V*u);#amount of flow of water in cc per hour#
print'Amount of flow of water through diaphragm=FW=cc per hour',FW
```

In [84]:

```
from math import log
C1=5*10**-4;
C2=2.5*10**-4;
x=(C1**2)/(C2+(2*C1));#The amount of Na+ transported at equilibrium in M#
print'The amount of Na+ transported at equilibrium=x=2*10**-4M'
NaR=C2+x;#Na+ on RHS#
print'\nNa+ on RHS=4.5*10**-4M.\nCl- on RHS=x=2*10**-4M.\nNa+ on LHS=Cl- on LHS=C1-x=3*10**-4M'
print'\nE is in volts and F in coulombs.for homogeneity of units either R should be expressed in coulombs or F in calories.F is 96500C or 23060cal.'
F=23060;
n=1;
T=300;#temperature in kelvin#
R=2;
K=1.5;
E=(R*T*log(K))/(n*F);#Emf across membrane in volts#
print'\nEmf across membrane=E=volts',round(E,4)
```

In [85]:

```
C1=0.04;
C2=0.02;
x=(C1**2)/(C2+(2*C1));#The amount of Na+ transported at equilibrium in M#
print'The amount of Na+ transported at equilibrium=x=M',x
NaR=C2+x;#Na+ on RHS#
print'\nNa+ on RHS=NaR=M',NaR
NaL=C1-x;#Na+ on LHS#
print'\nNa+ on LHS=NaL=M',NaL
```

In [86]:

```
from math import pi,sin
MW=58.45;#Molar weight of NaCl in grams#
d=2.17;#density of NaCl in g/cc#
MV=MW/d;#Molar volume in cc#
print'Molar Volume of NaCl=MV=cc',MV
print'\nThis must contain 6.023*10^23 NaCl units.\nIn one unit cell of NaCl there are 8 corner Na+ ions and 6 on the face centres.\nThe number of Na+ ions in one unit cell is 8*1/8+6*1/2=4.\nThere are 12Cl- ions on the edges,and one in the centre.\nThe number of Cl- ions are 12*1/4+1=4 '
print'\nThe volume of the unit cell containing 4 NaCl units=179*10^-24cc'
a=5.63*10**-8;#unit cell length in cm#
print'\nUnit cell length of NaCl crystal=a=5.63*10^-8cm'
Id=a/2;#Interionic distance in cm#
print'\nInterionic distance in the crystal=Id=2.815*10^-8cm'
Q=5.9;#glancing angle in degrees#
L=2*Id*sin(Q*pi/180)*10**8;#wavelenth in angstrums#
print'\nWavelength of the Xrays used=L=Angstrums',round(L,2)
```

In [87]:

```
N=2.;#No. of atoms or unit cells in BCC structure#
L=6.023*10**23;#Avagadro number#
a=4.291*10**-8;#Unit cell edge length in cm#
Na=23.;#weight of Na#
p=(N*Na)/(L*a**3);#density of Na at room temperature in g/cm**3#
print'Density of Na at room temperature=p=g/cm**3',p
P=p*1.0398;#density of Na at -195degrees temperature in g/cm**3#
print'\nDensity of Na at -195degrees temperature=P=g/cm**3',P
a1=5.35*10**-8;#unit cell edge length in cm#
N1=(P*L*a1**3)/(Na);#No. of unitcells at -195degrees#
print'\nNumber of unitcells at -195degrees=N1=',round(N1)
print'\nAt -195degrees temperature Na have 4 unitcells which means it assumes an FCC structure.'
```