question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_microwave_s_magnetic_field do 4 kind :numerical 5 describes "In a plane electromagnetic wave, the electric field oscillates sinusoidally at a frequency of 2.0 × " \ 6 "10¹⁰ Hz and amplitude %{electric}. %{magnetic}, in teslas?" 7 given electric: "48 V/m" 8 asks magnetic: "What is the amplitude of the oscillating magnetic field" 9 end
1 require_relative "../questions/a_microwave_s_magnetic_field" 2 require_relative "../science/electromagnetic_waves/electromagnetic_wave" 3 4 solve :a_microwave_s_magnetic_field , using: ElectromagneticWave do 5 objects :wave 6 7 take electric: wave . electric_field 8 9 magnetic = wave . magnetic_field 10 answer magnetic :, in: "T" , figures: 2 11 12 conclusion "The magnetic field of a light wave is its electric field over the speed of light, whatever the " \ 13 "frequency." 14 end
1 require_relative "../solutions/a_microwave_s_magnetic_field" 2 3 play_with :a_microwave_s_magnetic_field do 4 title "A Microwave's Magnetic Field" 5 end