question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :the_second_orbit_of_hydrogen do 4 kind :numerical 5 describes "The radius of the innermost electron orbit of a hydrogen atom is %{innermost}. %{radius} of the n = " \ 6 "%{level} orbit, in metres?" 7 given innermost: "5.3e-11 m" 8 given level: "2" 9 asks radius: "What is the radius" 10 end
1 require_relative "../questions/the_second_orbit_of_hydrogen" 2 require_relative "../science/atoms/bohr_model" 3 4 solve :the_second_orbit_of_hydrogen , using: BohrModel do 5 objects :innermost , :second 6 7 take innermost: innermost . orbit_radius 8 take level: second . quantum_number 9 10 deduce_from "innermost" , innermost . quantum_number => "1" 11 deduce_from "hydrogen atom" , innermost . atomic_number => "1" , second . atomic_number => "1" 12 deduce_from "electron orbit" , second . mass => innermost . mass 13 14 radius = second . orbit_radius 15 answer radius :, in: "m" , figures: 3 16 17 conclusion "An orbit's radius grows as the square of its quantum number, so the second orbit is four times " \ 18 "as wide as the innermost." 19 end
1 require_relative "../solutions/the_second_orbit_of_hydrogen" 2 3 play_with :the_second_orbit_of_hydrogen do 4 title "The Second Orbit of Hydrogen" 5 end