1require_relative "../physics"23question :how_high_it_goes do4 kind :numerical5 describes "A ball is thrown straight up at %{throw_speed}. Taking g as %{gravity}, %{height}, in metres?"6 given throw_speed: "29.4 m/s"7 given gravity: "9.8 m/s2"8 asks height: "how high does it rise"9end
1require_relative "../questions/how_high_it_goes"2require_relative "../science/motion_in_a_straight_line/uniform_acceleration"34solve :how_high_it_goes, using: UniformAcceleration do5 objects :ball6 ball.goes(:rising)78 deduce_from "thrown straight up", "Taking g as", ball.acceleration => -g9 take throw_speed: ball.initial_velocity, gravity: g10 assume ball.initial_position => "0 m"11 deduce_from "how high does it rise", ball.final_velocity => "0 m/s"12 take height: ball.final_position13 answer find_value(:height, in: "m")1415 conclusion "The height goes as the square of the launch speed: throw twice as fast and it " \16 "climbs four times as high."17end
1require_relative "../solutions/how_high_it_goes"23play_with :how_high_it_goes do4 title "How High It Goes"5end