#importing modules
import math
from __future__ import division
#Variable declaration
b=2.92*10**-3; #value of b(mK)
lamda=4900*10**-10; #wavelength(m)
#Calculations
T=b/lamda; #temperature(K)
#Result
print "temperature is",int(T),"K"
print "answer in the book is wrong"
#importing modules
import math
from __future__ import division
#Variable declaration
T=1500; #temperature(K)
lamda=5500; #wavelength(m)
lamda_m=20000; #wavelength(m)
#Calculations
T_dash=lamda_m*T/lamda; #temperature of sun(K)
#Result
print "temperature is",int(T_dash),"K"
#importing modules
import math
from __future__ import division
#Variable declaration
T=327+273; #temperature(K)
b=2.897*10**-3; #value of b(mK)
#Calculations
lamda_m=b/T; #wavelength(m)
#Result
print "wavelength is",int(lamda_m*10**10),"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
T=10**7; #temperature(K)
b=0.292; #value of b(cmK)
#Calculations
lamda_m=b/T; #wavelength(cm)
#Result
print "wavelength is",lamda_m*10**8,"angstrom"
#importing modules
import math
from __future__ import division
#Variable declaration
T=1127+273; #temperature(K)
lamda_m=2*10**-6; #wavelength(m)
lamda=14*10**-6; #wavelength(m)
#Calculations
Tm=lamda_m*T/lamda; #temperature of moon(K)
#Result
print "temperature of moon is",int(Tm),"K"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda_m=4753*10**-10; #wavelength(m)
lamda=14*10**-6; #wavelength(m)
b=0.2898*10**-2; #value of constant(mK)
#Calculations
Ts=b/lamda_m; #temperature of sun(K)
Tm=b/lamda; #temperature of moon(K)
#Result
print "temperature of sun is",int(Ts),"K"
print "temperature of moon is",int(Tm),"K"
#importing modules
import math
from __future__ import division
#Variable declaration
e=1.6*10**-19; #charge(coulomb)
m=9*10**-31; #mass(kg)
h=6.624*10**-34; #plank's constant(Js)
n=5.86*10**28; #density(electrons/m**3)
k=8.6*10**-5;
#Calculations
ef=(h**2/(8*m))*(3*n/math.pi)**(2/3); #energy(J)
ef=ef/e; #energy(eV)
theta_f=ef/k; #maximum kinetic energy(K)
#Result
print "maximum kinetic energy is",round(theta_f/10**4,2),"*10**4 K"
#importing modules
import math
from __future__ import division
#Variable declaration
e=1.6*10**-19; #charge(coulomb)
m=9*10**-31; #mass(kg)
h=6.62*10**-34; #plank's constant(Js)
rho=970; #density(kg/m**3)
N0=6.02*10**26; #avagadro number
A=23; #atomic weight
#Calculations
n=rho*N0/A; #concentration(electrons/m**3)
ef=(h**2/(8*m))*(3*n/math.pi)**(2/3); #fermi energy(J)
ef=ef/e; #fermi energy(eV)
#Result
print "fermi energy is",round(ef,3),"eV"
print "answer varies due to rounding off errors"