##Ex:13.1
import math
c=3.*10**8;
wl=15.;
f=c/wl;
print'%s %.2f %s'%("The frequency = ",f," Hz");
##Ex:13.2
import math
c=3.*10**8;
f=150.*10**6;
wl=c/f;
print'%s %.2f %s'%("The wavelength =",wl," m");
##Ex:13.3
import math
wl=8.;
f=30.*10**6;
v=f*wl;
print'%s %.2f %s'%("The veocity of propagation = ",v," m/s");
##Ex:13.4
import math
f_rf=162.5;##in kHz
f_af=1.25;##in kHz
f_bfo_max=f_rf+f_af;
f_bfo_min=f_rf-f_af;
print'%s %.2f %s %.2f %s '%("The two possible BFO freq. = ",f_bfo_max," kHz" and "",f_bfo_min,"kHz");
##Ex:13.5
import math
f_rf_1=88.;##in MHz
f_rf_2=108.;##in MHz
f_if=10.7;##in MHz
f_lo_1=f_rf_1+f_if;
f_lo_2=f_rf_2+f_if;
print'%s %.2f %s %.2f %s '%("The range local oscillator be tuned = ",f_lo_1," MHz" and "",f_lo_2," MHz");
##Ex:13.6
import math
f_rf_1=88.;##in MHz
f_rf_2=108.;##in MHz
f_if=10.7;##in MHz
f_lo_1=f_rf_1+f_if;
f_lo_2=f_rf_2+f_if;
print'%s %.2f %s %.2f %s '%("The range local oscillator be tuned = ",f_lo_1," MHz" and "",f_lo_2,"MHz");
##Ex:13.7
import math
r=12.;##in ohms
i=0.5;##in amps
P_r=i*i*r;##in W
print'%s %.2f %s'%("Power radiated = ",P_r," W");
##Ex:13.8
import math
r=2.;##in ohms
i=0.5;##in amps
P_r=4.;##in W
P_loss=i*i*r;
P_eff=(P_r/(P_r+P_loss))*100.;
print'%s %.2f %s'%("The power loss = ",P_loss," W");
print'%s %.2f %s'%("\n The power loss = ",P_eff,"");