#Example 21_1
import math
#To find the wavelength of the electromagnetic wave
v=3*10.0**8 #Units in meters/sec
f=1.02*10**6 #Units in Hz
lamda=v/f #Units in Meters
print "The Wavelength of the Electromagnetic wave is lamda=",round(lamda)," meters"
#Example 21_2
import math
#To find the value of magnetic field
eo=4.2*10**-3 #units in V/m
c=3*10**8 #Units in meters/sec
bo=eo/c #Units in T
print "The value of the magnetic field is Bo="
print bo
print "T"
#Example 21_3
import math
#To find the values of Eo and Bo in the wave
power=1000 #Units in W
r=10000 #units in meters
area=4*math.pi*r**2 #units in meter**2
P_a=power/area #unts in W/meter**2
c=3*10**8 #units in meters/sec
eeo=8.85*10**-12 #units in C**2/N*meter**2",round( ,5),"
eo=math.sqrt((2*P_a)/(c*eeo)) #units in N/C
bo=eo/c #Units in T
print "The value of Eo=",round(eo,5)," N/C\n The value of Bo=",
print bo
print "T"