Question: This is a physic problem with python. You and your group are writing a VPython program (ModelCar.py) that is meant to model the motion of

 This is a physic problem with python. You and your group

This is a physic problem with python.

You and your group are writing a VPython program (ModelCar.py) that is meant to model the motion of a car (m = 1450 kg) moving to the right with constant speed (v =5.41 m/s). The program that you and your group mates have written won't run! VPython produces no animation and the following message shows up in the Python Shell window: Traceback (most recent call last): File "Modelcar.py", line 16, in car.pos = car.pos + vcar*dt TypeError: unsupported operand type(s) for +: 'vector' and 'float' The program as written appears below. from visual import * car = box (pos=vector(-102,0,0), size=(4.4,1.8,0.9), color=color.red) ground = box (pos=vector(0,-1,0), size=( 300,1,1), color=color.green) mcar = 1450 vcar = 5.41 t = 0 dt = 0.01 while t >

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!