Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What comment should appear on line 29 in order to describe the function of the while loop that follows? a) This loop calculates the separation

 What comment should appear on line 29 in order to describe the function of the while loop that follows?
a) This loop calculates the separation vector and calculates for the electric field.
b) This loop defines objects involved with the entire code
c) This loop defines the rate at which time will develop throughout the calculation and how long the loop will run
d) This loop tells us that the code will run for 10 seconds only.

2. What comment should appear on line 33 in order to describe the function of the for loop that follows?
a) This loop creates the electric field arrows that we see printed visually from the code.
b) This loop defines the rate at which time will develop throughout the calculation and how long the loop will run.
c) This loop defines objects in the list ''clouds"
d) This loop calculates the separation vector and the electric field from each point charge in the list ``clouds". Then it adds the electric field from the point charge to the net electric field.image text in transcribed 

1 GlowScript 2.7 VPython 2 ## Scene Setup 3 scene display (width=1000, height = 1000) 4 5 ## Parameters 6 ec 1.6e-19 7 k = 9e9 8 Q1 = -50 9 02 50 10 Q3 = 100 11 12 #Objects 13 cloud1 14 cloud2 sphere (pos= vec(-500, 200,0), Q = Q1, radius = 15, color = color.white) sphere (pos= vec(100, 250,0), Q = Q2, radius = 15, color = color.white) 15 cloud3 sphere (pos= vec (600, 300,0), q = Q3, radius 20, color = color.white) 16 #List 17 clouds = [cloud1, cloud2, cloud3] 18 19 ## Charges 20 charge 21 q-1e-3 sphere (pos-vec(-200, 400,0), radius 22 q_velocity vec(0,0,0) 23 24 ##Calculation Loops 25 26 t = 0 27 dt = 0.1 28 t_final = 10 29 ## A 30 while t

Step by Step Solution

3.46 Rating (156 Votes )

There are 3 Steps involved in it

Step: 1

1 Answer c This loop defines the ra... 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

Governmental and Nonprofit Accounting

Authors: Robert Freeman, Craig Shoulders, Gregory Allison, Robert Smi

10th edition

132751267, 978-0132751261

More Books

Students also viewed these Physics questions

Question

Explain the importance of Human Resource Management

Answered: 1 week ago

Question

Discuss the scope of Human Resource Management

Answered: 1 week ago

Question

Discuss the different types of leadership

Answered: 1 week ago

Question

Write a note on Organisation manuals

Answered: 1 week ago

Question

Describe the process of sensory memory.

Answered: 1 week ago