question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :neon_and_oxygen_in_a_vessel do 4 kind :numerical 5 describes "A vessel contains two non-reactive gases: neon (monatomic) and oxygen (diatomic). The ratio of their " \ 6 "partial pressures is 3:2. %{ratio} of neon to oxygen in the vessel?" 7 asks ratio: "What is the ratio of the number of molecules" 8 end
1 require_relative "../questions/neon_and_oxygen_in_a_vessel" 2 require_relative "../science/kinetic_theory/ideal_gas" 3 4 solve :neon_and_oxygen_in_a_vessel , using: IdealGas do 5 objects :neon , :oxygen 6 7 deduce_from "partial pressures is 3:2" , neon . pressure => 1.5 * oxygen . pressure 8 deduce_from "A vessel contains two" , neon . volume => oxygen . volume , neon . temperature => oxygen . temperature 9 10 answer find_relation ( neon . amount / oxygen . amount ), figures: 2 11 12 conclusion "Sharing one vessel at one temperature, each gas presses in proportion to how many molecules it " \ 13 "has, whatever those molecules are." 14 end
1 require_relative "../solutions/neon_and_oxygen_in_a_vessel" 2 3 play_with :neon_and_oxygen_in_a_vessel do 4 title "Neon and Oxygen in a Vessel" 5 end