#Variable declaration
v1=10**5 #m per sec
deltav=0.01 #m per sec
m=9.11*10**-31# kg*m/s
e=1.6*10**-9 #Coulombs
#calculations&Results
#deltaE=0.5*m*(v2**2-v1**2)
#deltav=v2-v1.............deltav<<v1
print "The change in kinetic energy"
deltaE=m*v1*deltav
print "in J is %.2e"%deltaE
deltaE=deltaE/e
print "in eV is %.1e"%deltaE
import math
#Variable declaration
P=10
a=5*10**-10 # a=5 Armstrong
h=1.054*10**-34
m=9.11*10**-31 #kg
#Calculations&Results
#alpha*a=%pi
#sqrt((2*m*E2)/h**2)*a=pi
E2=(math.pi**2*h**2)/(2*m*a**2)
print 'E2= %.3e J'%E2
E2=E2*6.2415*10**18
print 'E2= %.2f eV'%E2
E1=1.053 #eV
AE=E2-E1
print 'AE= %.3f eV'%AE
import math
#Variable declaration
m=9.11*10**-31 #kg
E=1.6*10**-19 #C
h=6.625*10**-34 #J sec
#Calculations
N=(4*math.pi*(2*m)**(3./2)*2*E**(3./2))/(h**3*3)
#Result
print 'E2= %.1e per meter**3'%N
import math
#Variable declaration
y=10
Ni=10
gi=10
#Calculations
#(gi-Ni)!=1
z=(math.factorial(gi)/math.factorial(Ni)*math.factorial(gi-Ni))
#Result
print 'the possible number of ways of realizing a particular distribution = %.f'%z
import math
#Variable declaration
gi=10
Ni=9
#Calculations
x=gi-Ni
#factorial(gi-Ni)=1
z=(math.factorial(gi)/math.factorial(Ni)*math.factorial(gi-Ni))
#Result
print 'possible arrangements = %.f'%z
import math
#Variable declaration
T=300 #K
#Calculations
#a=E-Ef
#a=3*k*T
#fF(E)=1/(1+exp(E-Ef/kT))
z=math.exp(3)
y=1./(1+z) #y=fF(E)
#Result
print 'fF(E)=%.2f %%'%(y*100)
import math
#Variable declaration
Ef=6.25 #eV
E=5.95 #eV
p=0.01
k= 8.617 *10**-5 #eV K^-1
#Calculations
#p=1-fF(E)
#fF(E)=1./(1+exp(E-Ef/kT))
#p=1-1./(1+exp(E-Ef/kT)) equation 1
x=E-Ef
y=(1./(1-p))-1 # solving the above equtaion 1
T=x/(k*math.log(y))
#Result
print 'T=%.1f K\n'%T