from math import pi
#Variable declaration
Tc=7.26;#critical tempreture in kelvin
H0=8*1e5/(4*pi);#magnetic field at 0K
T=5;#tempreture in kelvin
#Calculation
Hc=H0*(1-(T/Tc)**2);#megnrtic field at 5K
#Result
print 'magnrtic field at 5K tempreture =%.2f*10^4 A/m'%(Hc/1e4)
#Incorrect answer in the textbook
from math import log
#Variable declaration
Tc=0.3;#given tempareture in kelvin
thetad=300;
#Calculations&Results
#part a
N0g=-1./(log(Tc/thetad));
print 'the value of N0g is %.2f'%N0g
#part b
kB=1.38*1e-23;#boltzmann constant
Eg=3.5*kB*Tc;#energy
print 'energy is= %.2f*10^-23 J'%(Eg/1e-23)
#Variable declaration
H0=0.0306;#given constant characteristic of lead material
Tc=3.7;#given tempareture in kelvin
T=2;#given tempareture in kelvin
#Calculations
x=(T/Tc)*(T/Tc);
Hc=H0*(1-x);#value of magnetic field at 2K temp
#Result
print 'value of magnetic field at 2K temp = %.4f T'%Hc
from math import sqrt,pi
#Variable declaration
HcT=2*1e5/(4*pi);#magnetic field intensity at T K
Hc0=3*1e5/(4*pi);#magnetic field intensity at T=0K
Tc=3.69;#given temperature in K
#Calculation
T=sqrt(1-(HcT/Hc0))*Tc;#tempreture in K
#Result
print 'temperature of superconducture is= %.2f K'%T
from math import pi
#Variable declaration
H0=6.5*1e4;#given constant characteristic of lead material
Tc=7.18;#given temprature in kelvin
T=4.2;#given temprature in kelvin
#Calculations&Results
#part a
x=(T/Tc)*(T/Tc);
Hc=H0*(1-x);#value of magnetic field at 4.2K temp
print 'value of magnetic field at 4.2K temp= %.2f*10^4 A/M'%(Hc/1e4)
#part b
r=1e-3;#given radius
Ic=2*pi*r*Hc;#critical current
print 'critical current is = %.1f A'%Ic #Incorrect answer in the textbook
from math import sqrt
#Variable declaration
lemdaT=750;#given penetration depth at T=3.5K
Tc=4.22;#given critical tempreture
T=3.5;##given temperature
#Calculations&Results
#part a
x=(T/Tc)**4;#temporary variable
lemda0=lemdaT/sqrt(1-x);#penetration depth at T=0K
print 'penetration depth at T=0K is %.fA'%lemda0
#part b
N=6.02*1e26;#given
alpha=13.55*1e3;#given
M=200.6;#given
n0=N*alpha/M;
print 'molecular density = %.3f*10^28 /m^3'%(n0/1e28)
ns=n0*(1-(T/Tc)**4);#superconducting electron density
print 'superconducting electron density = %.3f*10^28 /m^3'%(ns/1e28)#Answer differs due to rounding-off values