from visual import * track = box(pos=vector(0,-.075, 0), size=(1.0, 0.05, .10)) cart = sphere(pos=vector(-0.5,0,0), radius=0.05, color=color.green) cart.m = 0.80 cart.p = cart.m*vector(0.5, 0, 0) deltat = 0.01 t = 0 scene.autoscale=0 #(1) Calculate how far the cart will move in one time step (one execution of the loop). 0.5*0.01=0.005 m #(2) How many executions of the loop will it take for the cart to move one meter? 200 #(3) What will the time t be after moving one meter? 1m/(0.5 m/s) = 2 s cart.p = cart.m*vector(0.7, 0.1, 0) while t<3.0: t = t + deltat rate(100) cart.pos = cart.pos + (cart.p/cart.m)*deltat #(4) Write the force vector that points to the left (the -x direction) with a magnitude of 0.4 N.: <-0.4, 0,0>N Fnet = vector(-0.4, 0, 0) cart.p = cart.p + Fnet*deltat print 't=', t, 'cart.p=', cart.p