1require_relative "../physics"23question :twice_as_fast_to_stop do4 kind :scq5 describes "Braking just as hard, how much farther does a car need to stop from twice the speed?"67 option "Twice as far", as: :twice8 option "Four times as far", as: :four9 option "Eight times as far", as: :eight10 option "Just as far", as: :same11end
1require_relative "../questions/twice_as_fast_to_stop"2require_relative "../science/motion_in_a_straight_line/uniform_acceleration"34solve :twice_as_fast_to_stop, using: UniformAcceleration do5 objects :car, :faster_car6 car.goes(:braking)7 faster_car.goes(:braking_too)89 deduce_from "to stop", car.final_velocity => "0 m/s", faster_car.final_velocity => "0 m/s"10 deduce_from "twice the speed", faster_car.initial_velocity => 2 * car.initial_velocity11 deduce_from "Braking just as hard", faster_car.acceleration => car.acceleration12 assume car.initial_position => "0 m", faster_car.initial_position => "0 m"13 take twice: 2, four: 4, eight: 8, same: 11415 answer find_relation(faster_car.final_position / car.final_position)1617 conclusion "Stopping distance goes as the square of the speed, because a car going twice as " \18 "fast takes twice as long to stop and covers ground twice as fast all that time."19end
1require_relative "../solutions/twice_as_fast_to_stop"23play_with :twice_as_fast_to_stop do4 title "Twice as Fast to Stop"5end