import math
from math import pi,sqrt
vpp=11.0 #peak to peak voltage of modulating signal
vcp=10.0 #carrier peak voltage
#Determination of modulation index
E_max=vcp+(vpp/2)
E_min=vcp-(vpp/2)
m=(E_max -E_min)/(E_max+E_min)
print 'The modulation index is',m
#determination of k ratio of side lengths
L1_L2=E_max/E_min
L1_L2=round(L1_L2,2)
print 'The ratio of side lengths L1/L2 is',L1_L2
import math
fc=10*10**6 #Carrier freq
fm=5*10**3 #Modullating freq
vp=10.0
vm=6.0 #Determination of modulation index
m=vm/vp
m=round(m,1)
print 'The modulation index is',m
import math
from math import sqrt
I=12.0
Ic=10.0
#Determination of modulation index
m=sqrt(2*(((I/Ic)**2) -1))
m=round(m,1)
print 'The modulation index is',m
import math
from math import sqrt,pi
fm=10*10**3 #modulation freq
c=1000*10**-12
R=10*10**3
Yp=complex((1/R),(2*(pi)*fm*c)) #admittance of RC load
Ypi=Yp.imag*10**5
Ypi=round(Ypi,2)*10**-5
print 'Yp=',Ypi,'j'
Zp=1/sqrt(((Yp.real)**2)+((Yp.imag)**2))
Zp=round(Zp,1)
print 'Zp=',Zp
#Determination of max modulation index
m=Zp/R
m=round(m,2)
print 'The max modulation index is',m