1require_relative "../physics"23question :how_long_to_stop do4 kind :numerical5 describes "A car doing %{speed} brakes steadily and comes to rest in %{distance}. %{time}, in seconds?"6 given speed: "126 km/h"7 given distance: "200 m"8 asks time: "How long does it take to stop"9end
1require_relative "../questions/how_long_to_stop"2require_relative "../science/motion_in_a_straight_line/uniform_acceleration"34solve :how_long_to_stop, using: UniformAcceleration do5 take speed: :v_0, distance: :x6 deduce_from "comes to rest", v: "0 m/s"7 assume x_0: "0 m"8 take time: :t9 answer find_value(:time, in: "s", figures: 3)1011 conclusion "Under a steady acceleration the average velocity is halfway between the first and " \12 "the last, so the time is the distance over that average."13end
1require_relative "../solutions/how_long_to_stop"23play_with :how_long_to_stop do4 title "How Long to Stop"5end