question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :round_the_groove do 4 kind :numerical 5 describes "An insect trapped in a circular groove of radius %{radius} goes round it steadily, %{turns} " \ 6 "times in %{time}. %{angular_speed}, in rad/s?" 7 given radius: "12 cm" 8 given turns: 7.0 9 given time: "100 s" 10 asks angular_speed: "What is its angular speed" 11 end
1 require_relative "../questions/round_the_groove" 2 require_relative "../science/motion_in_a_plane/uniform_circular_motion" 3 4 solve :round_the_groove , using: UniformCircularMotion do 5 objects :insect 6 paths :groove 7 insect . goes ( :round , on: groove ) 8 take radius: groove . radius , turns: insect . revolutions , time: round . time_taken 9 angular_speed = insect . angular_speed 10 answer angular_speed :, in: "rad/s" , figures: 2 11 conclusion "Each time round sweeps a full turn, so the angular speed is the turns per second " \ 12 "times a full turn in radians; the size of the groove does not enter." 13 end
1 require_relative "../solutions/round_the_groove" 2 3 play_with :round_the_groove do 4 title "Round the Groove" 5 end