#given
Vcc =48
I = 3.5
efficiency =70 #percent
modulation = 67 #percent
m = modulation/100.0
#calculation
Pi = Vcc*I
Pc=Pi
Pm = Pi/2.0
Pout = (efficiency*Pi)/100.0
Ps = Pc*((m**2)/4.0)
maximum_swing = 2*Vcc
#Result
print "(a) RF input power to the output stage is ",Pi,"W"
print "(b) AF power required for 100 percent modulation is ",Pm,"W"
print "(c) Carrier output power is ",Pout,"W"
print "(d) Power in one sideband for 67 percent modulation is ",round(Ps,2),"W"
print "(e) maximum and minimum dc supply voltage swing with 100 percent modulation is ",maximum_swing,"V"
#given
fc =4.2*10**6
f1 = 300
f2 = 3400
#calculation
#upper sideband
x0=fc+f1
y0=fc+f2
#lower sideband
x1=fc-f1
y1=fc-f2
frequency=(x1+y1)/2.0
#Result
print "(a) Upper sideband ranges from ",x0,"to",y0
print " lower sideband ranges from ",x1,"to",y1
print "(b) approximate center frequency of a bandpass filter is ",frequency,"Hz"