question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :the_hydrogen_atom_s_size do 4 kind :numerical 5 describes "It is found experimentally that %{energy} of energy is required to separate a hydrogen atom into a " \ 6 "proton and an electron. %{radius}, in metres?" 7 given energy: "13.6 eV" 8 asks radius: "What is the orbital radius of the electron" 9 end
1 require_relative "../questions/the_hydrogen_atom_s_size" 2 require_relative "../science/atoms/bohr_model" 3 4 solve :the_hydrogen_atom_s_size , using: BohrModel do 5 objects :electron 6 7 take energy: electron . binding_energy 8 9 radius = electron . orbit_radius 10 answer radius :, in: "m" , figures: 2 11 12 conclusion "The electron is held as far out as the energy needed to free it allows; that sets the size of the atom." 13 end
1 require_relative "../solutions/the_hydrogen_atom_s_size" 2 3 play_with :the_hydrogen_atom_s_size do 4 title "The Hydrogen Atom's Size" 5 end