Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed
- 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions