Question: Put the following lines into a glowscript script and run them: energies = [ 8 , 7 , 1 , 6 ] E = 0

Put the following lines into a glowscript script and run them:
energies =[8,7,1,6]
E=0
for energy in energies:
,E=E+ energy
pr(E)
Match the line of programming syntax with the lettered statement describing the action of the syntax.
A Adds the value of energy to the running total.
B Displays the sum of the energies (i.e. the total energy).
C Assigns an initial value to the running total.
D Loops through the energies and assigns each item to energy succesively.
(c)E=E+ energy
c.E=0.
Q. for energy in energies:
(pr(E)
Submit Answer Tries 0/99
(b.) What is the value of the variable "energy" the second time through the for loop?
Tries 099
(c.) What is the final value of E?
 Put the following lines into a glowscript script and run them:

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!