question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :the_long_way_round_speed do 4 kind :numerical 5 describes "A hotel is 10 km from the station along a straight road, but a dishonest driver takes a " \ 6 "%{route} route and gets there in %{time}. %{average_speed}, in km/h?" 7 given route: "23 km" 8 given time: "28 min" 9 asks average_speed: "What is the taxi's average speed" 10 end
1 require_relative "../questions/the_long_way_round_speed" 2 require_relative "../science/motion_in_a_plane/motion_in_a_plane" 3 4 solve :the_long_way_round_speed , using: MotionInAPlane do 5 take route: :d , time: :Delta_t 6 take average_speed: :c_av 7 answer find_value ( :average_speed , in: "km/h" , figures: 3 ) 8 9 conclusion "Average speed counts the whole of the road driven, however roundabout." 10 end
1 require_relative "../solutions/the_long_way_round_speed" 2 3 play_with :the_long_way_round_speed do 4 title "The Long Way Round: Speed" 5 end