1require_relative "../physics"23question :fifty_grams_of_ice_in_water_at_eighty do4 kind :scq5 describes "%{ice_mass} of ice at %{ice_temperature} is mixed with %{water_mass} of water at %{water_temperature}, " \6 "final temperature of mixture will be"7 given ice_mass: "50 g"8 given ice_temperature: "0 °C"9 given water_mass: "50 g"10 given water_temperature: "80 °C"1112 option "0 °C"13 option "40 °C"14 option "30 °C"15 option "4 °C"16end
1require_relative "../questions/fifty_grams_of_ice_in_water_at_eighty"2require_relative "../science/thermal_properties_of_matter/calorimetry"34solve :fifty_grams_of_ice_in_water_at_eighty, using: Calorimetry do5 objects :ice, :water67 take ice_mass: ice.mass, ice_temperature: ice.temperature_at_first8 take water_mass: water.mass, water_temperature: water.temperature_at_first910 deduce_from "of water at", water.specific_heat_capacity => "1 cal/g °C", water.heat_to_change_phase => "0 J"11 deduce_from "of ice at", ice.latent_heat => "80 cal/g", ice.specific_heat_capacity => water.specific_heat_capacity12 deduce_from "final temperature of mixture", ice.temperature_after => water.temperature_after,13 ice.heat_taken_in => -water.heat_taken_in1415 answer find_value(water.temperature_after, in: "°C")1617 conclusion "Each gram of water cooling 80 degrees gives the 80 cal a gram of ice needs to melt, and the masses " \18 "are equal, so the ice just melts and the mixture stays at 0 °C."19end
1require_relative "../solutions/fifty_grams_of_ice_in_water_at_eighty"23play_with :fifty_grams_of_ice_in_water_at_eighty do4 title "Fifty Grams Of Ice In Water At Eighty"5end