question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :caesium_stopped_at_sixty_centivolts do 4 kind :numerical 5 describes "The work function of caesium is %{work_function}. %{wavelength} if the photocurrent is brought to zero " \ 6 "by a stopping potential of %{stopping}, in nm?" 7 given work_function: "2.14 eV" 8 given stopping: "0.60 V" 9 asks wavelength: "What is the wavelength of the incident light" 10 end
1 require_relative "../questions/caesium_stopped_at_sixty_centivolts" 2 require_relative "../science/dual_nature_of_radiation_and_matter/photoelectric_effect" 3 4 solve :caesium_stopped_at_sixty_centivolts , using: PhotoelectricEffect do 5 objects :caesium 6 7 take work_function: caesium . work_function 8 take stopping: caesium . stopping_potential 9 10 wavelength = caesium . wavelength 11 answer wavelength :, in: "nm" , figures: 3 12 13 conclusion "The stopping potential measures the fastest electron's energy; add the work function and you have " \ 14 "the photon's energy, and so its wavelength." 15 end
1 require_relative "../solutions/caesium_stopped_at_sixty_centivolts" 2 3 play_with :caesium_stopped_at_sixty_centivolts do 4 title "Caesium Stopped at 0.60 V" 5 end