import math
#Variable declaration
e=1.6*10**-19#e=charge of an electron
Va=1000.#Va=potential difference in volts
m=9.11*10**-31#m=mass of an electron
#Calculations&Results
v=math.sqrt((2*e*Va)/m)#v=axial velocity of an electron
l=2*10**-2#l=axial length of deflecting plates in metre
t=l/v#t=transit time of the beam through the deflecting plates
print "The transit time is = %.2e s"%t
Vd=20#Vd=potential difference applied between the deflecting plates in volts
s=5*10**-3#s=separation between the plates in metre
ta=(e*Vd)/(s*m)#ta=the traverse acceleration imparted to the electrons by the deflecting voltage
print "Traverse acceleration is = %.3e m/s^2"%ta
L=25*10**-2#L=distance of the CRT screen from the centre of the deflecting plates in metre
d=(l*L*Vd)/(2*s*Va)#d=deflection of the spot on the CRT screen
print "Spot deflection is = %.f cm"%(d*100)#d is converted in terms of cm
S=d/Vd#S=deflection sensitivity
print "Deflection sensitivity is = %.1f mm/V"%(S/10**-3)#S is converted in terms of mm/V
import math
#Variable declaration
e=1.6*10**-19#e=charge of an electron
Va=1000#Va=potential difference in volts
m=9.11*10**-31#m=mass of an electron
#Calculations
v=math.sqrt((2*e*Va)/m)#v=axial velocity of an electron
l=1.5*10**-2#l=axial length of deflecting plates in metre
t=l/v#t=transit time of the beam through the deflecting plates
#T=time period of the sinusoidal deflecting voltage
#tmax=maximum transit time
#(0.1/360)*T=tmax,since 1 cycle corresponds to 360 degrees
T=(t*360)/0.1
f=1/T#f=highest frequency of the deflecting voltage
#Results
print "The highest frequency of the deflecting voltage is = %.f kHz"%(f/1000)
import math
#Variable declaration
V=1000#V=potential difference in volts
#B=150 gauss (given)
B=1.5*10**-2#B=magnetic field in tesla
l=1*10**-2#l=axial length of deflecting plates in metre
L1=20*10**-2#L1=(L+(l/2))=distance of the fluorescent screen from the centre of the deflection system in metre
e=1.6*10**-19#e=charge of an electron
m=9.11*10**-31#m=mass of an electron
#Calculations&Results
d=B*math.sqrt(e/(2*V*m))*l*L1#d=deflection of the spot
print "The deflection of the spot is=%.1f cm"%(d*100)
Sm=d/B#Sm=magnetic deflection sensitivity
print "The magnetic deflection sensitivity is=%.2f mm/gauss"%(Sm/10)
#Variable declaration
sw=10#sw=sweep width in cm
n=5./2#n=number of cycles given by vertical deflection plates
#Calculations
c=sw/n#c=centimetres occupied by one cycle of signal
ct=0.1#ct=calibrated time base of CRO in ms/cm
t=ct*c#t=time interval corresponding to centimetres occupied by one cycle of signal
T=t/5#T=time period of the signal,since the scale is 5 times magnified
f=1/T#f=frequency of the signal
#Results
print "The frequency of the signal is = %.1f kHz"%f
#Variable declaration
#Let fv=frequency of the vertical signals in kHz
#fh=frequency of the horizontal signals
#Number of horizontal tangencies=nh
#Number of vertical tangencies=nv
#fv/fh=nh/nv
fh=1
nh=3.
nv=4
#Calculations
fv=(nh/nv)*fh
#Results
print "The frequency of the vertical signal is = %.f Hz"%(fv*1000)
import math
#Variable declaration
#slope of the major axis is negative (given)
A=2.6#A=The maximum y-displacement
vyo=1.1#vyo=the vertical displacement
#Calculations&Results
sino=(vyo/A)#o=phase difference between the two voltages
x=math.degrees(math.asin(sino))
#Results
print "As the major axis of the ellipse has a negative slope,phase difference between the two voltages must lie between",\
"90 degree and 180 degree"
print "Therefore,phase difference between the voltages is = %.f degrees"%(180-x)