1require_relative "../physics"23question :back_in_the_hands do4 kind :numerical5 describes "A ball is thrown straight up at %{throw_speed}. Taking g as %{gravity}, %{time}?"6 given throw_speed: "29.4 m/s"7 given gravity: "9.8 m/s2"8 asks time: "after how many seconds is it back in the thrower's hands"9end
1require_relative "../questions/back_in_the_hands"2require_relative "../science/motion_in_a_straight_line/uniform_acceleration"34solve :back_in_the_hands, using: UniformAcceleration do5 objects :ball6 ball.goes(:flying)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 "back in the thrower's hands", ball.final_position => "0 m"12 take time: flying.time_taken13 answer find_value(:time, in: "s")1415 conclusion "It takes as long to come down as to go up, and comes back at the speed it left " \16 "with, pointing the other way."17end
1require_relative "../solutions/back_in_the_hands"23play_with :back_in_the_hands do4 title "Back in the Hands"5end