#Given
b=-32
a=32.0
c=1
#Calculation
import math
r=(-b+(math.sqrt(b**2-(4*a*c))))/(2.0*a)
#Result
print"The ratio of E/V0 = ", round(r*10**0)
print "-ve value is not possible. "
#Given
E=9 #ev
v0=5 #ev
#Calculation
R=((math.sqrt(E)-(math.sqrt(E-v0)))/(math.sqrt(E)+(math.sqrt(E-v0))))**2
#Result
print"Reflection ratio is ", R
#Given
E=9 #Kinetic energy of a particle in ev
v0=10 #ev
E1=5 #ev
E2=15
E3=10 #ev
#calculation
import math
R=((math.sqrt(E2)-(math.sqrt(E2-v0)))/(math.sqrt(E2)+(math.sqrt(E2-v0))))**2
T=1-R
#Result
print"(a) E1 < vo, therefore R=1, T=0"
print"(b) reflection coefficient R= ",round(R,3),"\n transmission coefficient T= ",round(T,3)
print"(c) E3=v0, therefore R=1 , T=0"
#Given
E=2 #ev
v0=3 #ev
m=9*10**-31
a=4*10**-10 #m
h=1.05*10**-34
b=(v0-E)*(1.6*10**-19)
#Calculation
import math
Ka=((math.sqrt(2*m*(b)))*a)/h
x=math.sin(Ka*3.14/180.0)
T=(v0**2)/(4.0*E*(v0-E))
T1=1/(1+(T*x**2))
#Result
print"Transmission coefficient is ", round(T1,3)
#Given
E=2 #ev
v0=3 #ev
m=9*10**-31
a=1*10**-10 #m
h=1.05*10**-34
b=(v0-E)*(1.6*10**-19)
#Calculation
import math
Ka=((math.sqrt(2*m*(b)))*a)/h
x=math.sin(Ka*3.14/180.0)
T=(v0**2)/(4.0*E*(v0-E))
T1=1/(1.0+(T*x))
#Result
print"Transmission coefficient is ", round(T1,2)
#Given
E=10*10**6 #ev
T=2.0*10**-3
m=6.68*10**-27 #kg
h=1.054*10**-34 #Js
e=1.6*10**-19
v0=30.0*10**6 #ev
#Calculation
import math
K=(math.sqrt(2*m*(v0-E)*e))/h
a=(1/(2.0*K))*(2.303*log10((16/T)*(E/v0)*(1-(E/v0))))
#Result
print"The width of the barrier is ", round(a,17),"m"