question.rb
solution.rb
playground.rb
1 require_relative "../physics" 2 3 question :a_car_battery_shorted do 4 kind :numerical 5 describes "The storage battery of a car has an emf of %{emf}. If the internal resistance of the battery is " \ 6 "%{internal}, %{current}, in amperes?" 7 given emf: "12 V" 8 given internal: "0.4 Ω" 9 asks current: "what is the maximum current that can be drawn from the battery" 10 end
1 require_relative "../questions/a_car_battery_shorted" 2 require_relative "../science/current_electricity/ohms_law" 3 4 solve :a_car_battery_shorted , using: OhmsLaw do 5 objects :battery 6 7 take emf: battery . voltage 8 take internal: battery . resistance 9 10 current = battery . current 11 answer current :, in: "A" , figures: 2 12 13 conclusion "The most current flows when nothing outside the battery resists it, so the whole emf drives the " \ 14 "current through the battery's own internal resistance." 15 end
1 require_relative "../solutions/a_car_battery_shorted" 2 3 play_with :a_car_battery_shorted do 4 title "A Car Battery Shorted" 5 end