question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :photons_from_a_helium_neon_laser do 4 kind :numerical 5 describes "Monochromatic light of wavelength %{wavelength} is produced by a helium-neon laser. The power " \ 6 "emitted is %{power}. %{photons}?" 7 given wavelength: "632.8 nm" 8 given power: "9.42 mW" 9 asks photons: "How many photons per second, on the average, arrive at a target irradiated by this beam" 10 end
1 require_relative "../questions/photons_from_a_helium_neon_laser" 2 require_relative "../science/dual_nature_of_radiation_and_matter/photon" 3 4 solve :photons_from_a_helium_neon_laser , using: Photon do 5 objects :beam 6 7 take wavelength: beam . wavelength 8 take power: beam . emitted_power 9 10 photons = beam . photons_a_second 11 answer photons :, in: "s-1" , figures: 2 12 13 conclusion "The whole beam lands on the target, so the photons arriving each second carry the beam's power, one " \ 14 "photon's energy at a time." 15 end
1 require_relative "../solutions/photons_from_a_helium_neon_laser" 2 3 play_with :photons_from_a_helium_neon_laser do 4 title "Photons From a Helium-Neon Laser" 5 end