Question: problem 78 and 79 please. - P78 Consider the VPython program shown below. (a) An important skill is being able to read and understand an

problem 78 and 79 please.
problem 78 and 79 please. - P78 Consider the VPython program shown

- P78 Consider the VPython program shown below. (a) An important skill is being able to read and understand an existing program, in order to be able to make useful modifications. Before running the program, study the program carefully line by line, then answer the following questions: (1) What is the initial velocity of the particle? (2) Is the particle initially located in front of the box or behind it? (3) In which line of code is the position of the particle updated? (4) What is the value of the time step ? (5) Will the particle bounce off of the red box, or travel through it? (b) Now run the program, and see if your answers were correct. (c) Modify the program to start the particle from an initial position on the +x axis, to the right of and in front of the red box. Give the particle a velocity that will make it travel to the left, along the x axis, passing in front of the box. from visual import : box ( pos vect or (0,0,1). Bize: {5,5,0.5}, colorecolor. red, opaeity = Q.4. **-P79 Modify the program shown above to make the particle bounce off the red box instead of passing through it. On the Help menu available in IDLE (the VPython editor), choose "Python docs" or search the web for "Python if" to find out how to use an if statement. You may also find it helpful to look at the example program bounce2. py, included in the examples installed with VPython

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!