#importing module
import math
from __future__ import division
#Variable declaration
V=20000 #potential in Volts
e=1.602*10**-19 #electronic charge in C
m=9.1*10**-31 #mass of electron in kg
c=3*10**8 #speed of light in m/s
#Calculations
u=math.sqrt((2*V*e)/m) #speed u after acceleration through a potential V in m/s
mu=1/math.sqrt(1-(u/c)**2) #mass of electron moving with velocity mu in kg
delm=mu-1 #change in mass
#Result
print("The percentage change in mass of the electron is %1.1f %%" %(delm*100))
#importing module
import math
from __future__ import division
#Variable declaration
l=3*10**-3 #distance between two plate in meters
V=400 #potential difference in Volts
e=1.602*10**-19 #electronic charge in Joules
m=9.1*10**-31 #mass of electron in kg
#Calculations
uB=math.sqrt((2*V*e)/m) #in m/s
KEJ=e*V #in Joules
KEeV=int(e*V/(1.6*10**-19)) #in eV
tAB=(2*l/uB) #in ns
#Result
print("i)")
print("Velocity with which the electrons strikes the plate = %.2f*10**6 m/s" %(uB/10**6))
print("ii)")
print("Kinetic energy acquired by electron in joules = %.3f*10**-17 J" %(KEJ/10**-17))
print("Kinetic energy acquired by electron in eV = %i" %KEeV)
print("iii)")
print("transit time in ns = %.3f" %(tAB/10**-9))#The answers vary due to round off error
#importing module
import math
from __future__ import division
#Variable declaration
B=0.02 #flux Density in Wb/m**2
u=5*10**7 #speed of electron in m/s
e=1.6*10**-19 #electronic charge Joules
m=9.1*10**-31 #mass of electron in kg
#Calculations
r=(m*u)/(e*B) #in m
#Result
print("radius of the circular path followed by electron is = %.2f*10**-2 m" %(r/10**-2))
#importing module
import math
from __future__ import division
#Variable declaration
L=3*10**-2 #length of plates in m
d=4*10**-3 #spacing betweenn plates in m
l=30*10**-2 #distance in m
V1=2500 #potential in V
#Calculations
Se=(L*l)/(2*d*V1)/10**-4
#Result
print("Deflection Sensitivity = %1.1f*10**-4 m/V" %Se)
#importing module
import math
from __future__ import division
#Variable declaration
Ey=3*10**4 #electric field in y-axis in N/C
Ex=0 #electric field in x-axis in N/C
q=1.6*10**-19 #electric charge in C
me=9.1*10**-31 #in kg
#Calculations
#F=q*E
Fy=-q*Ey #Force in y direction
ay=Fy/me
#Result
print("Acceleration of the electron is = %.1f*10**15 m/s**2" %(ay/10**15))
#The negative sign tells us that the direction of this acceleration is downward
#importing module
import math
from __future__ import division
#Variable declaration
Ey=3*10**4 #electric field in y-axis in N/C
V=2000 #potential in V
e=1.602*10**-19 #electronic charge in eV
m=9.1*10**-31 #mass of electron in kg
#Calculations
u=math.sqrt((2*V*e)/m)
#Result
print("velocity with which electron beam will travel= %.2f*10**7 m/s" %(u/10**7))
#importing module
import math
from __future__ import division
#Variable declaration
l=5 #length to be covered in cm
up=26.5*10**8 #in cm/s
#Calculations
t=(2*l/up)
#Result
print("Time taken= %1.1f s" %(t/10**-9))
#The answers vary due to round off error