question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_jump_between_two_levels do 4 kind :numerical 5 describes "A difference of %{gap} separates two energy levels in an atom. %{frequency} when the atom makes a " \ 6 "transition from the upper level to the lower level, in hertz?" 7 given gap: "2.3 eV" 8 asks frequency: "What is the frequency of radiation emitted" 9 end
1 require_relative "../questions/a_jump_between_two_levels" 2 require_relative "../science/atoms/bohr_model" 3 4 solve :a_jump_between_two_levels , using: BohrModel do 5 objects :radiation 6 7 take gap: radiation . photon_energy 8 9 frequency = radiation . frequency 10 answer frequency :, in: "Hz" , figures: 2 11 12 conclusion "The atom loses exactly the energy between the two levels and sends it out as one photon, whose " \ 13 "frequency is that energy over Planck's constant." 14 end
1 require_relative "../solutions/a_jump_between_two_levels" 2 3 play_with :a_jump_between_two_levels do 4 title "A Jump Between Two Levels" 5 end