Question: The following program was submitted by a physics student. Read over it and answer the questions below. from future import division from visual import 1


The following program was submitted by a physics student. Read over it and answer the questions below. from future import division from visual import 1 2. 3 4 5 6 7 track = box(pos=vector(0,-.05, 0), size=(2.0, 0.05, 10), color-color.white) cart = box(pos=vector(1,0,0), size=(.1, 0.04.06), color-color.blue) mcart = 0.80 pcart=mcart vector(-0.5, .5, 0) print 'cart momentum , pcart deltat = 0.01 t=0 Fair = vector(.05,0,0) 10 11 12 13 14 15 16 17 18 19 20 21 22 23 whilets 20 rate(100) pcart=pcart+Fair*deltat cart.pos = cart.pos + (pcart/mcart)*deltat #print the time is now', t t=t+deltat print 'after the loop 1. How many times will the program update the cart's momentum? times 2. Use the reference numbers in red to identify the line that represents the Momentum Principle. line 3. Use the reference numbers in red to identify the line that is responsible for moving the cart across the screen in the visual output (the visualization). line 4. Which of the following will happen in the visual output if the Momentum Principle is omitted from this program? O The cart will maintain a constant momentum across the screen. The cart will not move. O The program will display an error message. O The cart will fall off the track. 5. Which of the following will happen in the visual output if the position update formula is omitted from this program? O The program will display an error message. O The cart will fall off the track. The cart will maintain a constant momentum across the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
