question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_radio_s_longest_wavelength do 4 kind :numerical 5 describes "A radio can tune in to any station in the %{frequency} to 12 MHz band. %{wavelength}, in metres?" 6 given frequency: "7.5 MHz" 7 asks wavelength: "What is the longest wavelength of the corresponding wavelength band" 8 end
1 require_relative "../questions/a_radio_s_longest_wavelength" 2 require_relative "../science/electromagnetic_waves/electromagnetic_wave" 3 4 solve :a_radio_s_longest_wavelength , using: ElectromagneticWave do 5 objects :wave 6 7 take frequency: wave . frequency 8 9 wavelength = wave . wavelength 10 answer wavelength :, in: "m" , figures: 2 11 12 conclusion "Wavelength and frequency go inversely at the speed of light, so the lowest frequency of the " \ 13 "band gives its longest wavelength." 14 end
1 require_relative "../solutions/a_radio_s_longest_wavelength" 2 3 play_with :a_radio_s_longest_wavelength do 4 title "A Radio's Longest Wavelength" 5 end