question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :water_cooling_toward_its_surroundings do 4 kind :scq 5 describes "A certain quantity of water cools from %{first_from} to %{first_to} in the first %{first_time} and to " \ 6 "%{then_to} in the next %{then_time}. The temperature of the surroundings is :" 7 given first_from: "70 °C" 8 given first_to: "60 °C" 9 given first_time: "5 min" 10 given then_to: "54 °C" 11 given then_time: "5 min" 12 13 option "20 °C" 14 option "42 °C" 15 option "10 °C" 16 option "45 °C" 17 end
1 require_relative "../questions/water_cooling_toward_its_surroundings" 2 require_relative "../science/thermal_properties_of_matter/newtons_law_of_cooling" 3 4 solve :water_cooling_toward_its_surroundings , using: NewtonsLawOfCooling do 5 objects :water , :air 6 water . goes ( :cooling_first , in: air ) 7 water . goes ( :cooling_next , in: air ) 8 9 take first_from: water . temperature ( at: cooling_first . start ) 10 take first_to: water . temperature ( at: cooling_first . end ) 11 take first_time: cooling_first . time_taken 12 take then_to: water . temperature ( at: cooling_next . end ) 13 take then_time: cooling_next . time_taken 14 deduce_from "in the next" , water . temperature ( at: cooling_next . start ) => water . temperature ( at: cooling_first . end ) 15 16 answer find_value ( air . temperature , in: "°C" ) 17 18 conclusion "The water loses heat at a rate set by how much hotter than its surroundings it is; the second drop is " \ 19 "smaller because it starts nearer room temperature, and only 45 °C makes the two rates agree." 20 end
1 require_relative "../solutions/water_cooling_toward_its_surroundings" 2 3 play_with :water_cooling_toward_its_surroundings do 4 title "Water Cooling Toward Its Surroundings" 5 end