Question: ut the following lines into a glowscript script and run them: listofParticles = [] for i in range(0, 100): posx = 80*(random()-0.5) posy = 80*(random()-0.5)

 ut the following lines into a glowscript script and run them:

ut the following lines into a glowscript script and run them: listofParticles = [] for i in range(0, 100): posx = 80*(random()-0.5) posy = 80*(random()-0.5) posz = 80*( random()-0.5) vx = 100*(random()-0.5) vy = 100*(random()-0.5) vz = 100*(random()-0.5) newparticle = sphere(pos=vector(posx, posy, posz), radius=1) newparticle.mass = 1 newparticle.velocity = vector(vx, vy, vz) listofParticles.append(newparticle) You may want to edit the program to answer the following questions. (a.) What does range(0,100) provide? A list of numbers from 0 to 99. You are correct. Your receipt no. is 153-5071 Previous Tries (b.) What is the minimum value of random()? You are correct. Previous Tries Your receipt no. is 153-7 (c.) What is the minimum y-component of the velocity a particle in listOfParticles may have? Submit Answer Incorrect. Tries 2/99 Previous Tries (d.) What is the piece of the code that adds a particle to the list? listOfParticles.append(newparticle) You are correct. Your receipt no. is 153-1573 Previous Tries (e.) After the program has gone through the code in the for loop 5 times, how many items (particles) are in listOfParticles? Submit Answer Tries 0/99

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!