from math import pi
#Variable declaration
er=1.0000684;#dielectric constant of helium
N=2.7*1e25;#atoms/m^3
#Calculations
r=(er-1)/(4*pi*N);
R=r**(1./3); #radius of electron cloud
#Result
print 'radius of electron cloud is %.1f*10^-10 m'%(R/1e-10)
#Variable declaration
k=1.38*1e-23;#boltzmann constant
N=1e27;#HCL molecule per cubic meter
E=1e6;#electric field of vapour
D=3.33*1e-30;
#Calculations
pHCL=1.04*D;
T=300;#tempreture in kelvin
alpha=(pHCL)**2/(3*k*T);
p0=N*alpha*E;#orientation polarization
#Result
print 'orientation polarization is %.3f*10^-6 C/m^2'%(p0/1e-6)
#Variable declaration
alpha=0.35*1e-40;#polarizability of gas
N=2.7*1e25;
e0=8.854*1e-12;#permittivity of vacume
#Calculation
er=1+(N*alpha/e0);#relative permittivity
#Result
print 'relative permittivity is %.6f'%er
#Variable declaration
er=12.;#relative permittivity
N=5*1e28;#atoms/m^3
e0=8.854*1e-12;#permittivity of vacume
#Calculations
x=(er-1)/(er+2);
alpha=(3*e0/N)*x;#electrical polarizability
#Result
print 'electronic polarizability = %.2f*10^-40 F*m^2'%(alpha/1e-40)
from math import atan,degrees
#Variable declaration
C=2.4*1e-12;#given capacitance in F
e0=8.854*1e-12;#permittivity of vacume
a=4*1e-4;#area in m^2
d=0.5*1e-2;#thickness
tandelta=0.02;
#Calculations&Results
er=(C*d)/(e0*a);#relative permittivity
print 'relative permittivity = %.2f'%er
lf=er*tandelta;#loss factor
print 'electric loss factor = %.4f'%lf
delta=degrees(atan(tandelta))
PA=90-delta;#phase angle
print 'phase angle = %.2f degrees'%PA
#incorrect answers in the textbook
#Variable declaration
er=8.;#relative permittivity
a=0.036;#area in m^2
e0=8.854*1e-12;#permittivity of vacume
C=6*1e-6;#capacitance in F
V=15.0;#potential difference
#Calculations
d=(e0*er*a)/C;
E=V/d;#field strength
#Results
print 'field strength is= %.3f*10^7 V/m'%(E/1e+7)
dpm=e0*(er-1)*E;#dipole moment/unit volume
print 'dipole moment/unit volume= %.4f*10^-2 C/m^2'%(dpm/1e-2)
#Incorrect answers in the textbook