subject
Engineering, 03.03.2020 17:28 ashleyaparicio7116

Please write the following code in Python 3. Also please show all output(s) and share your code.

Below is a for loop that works. Underneath the for loop, rewrite the problem so that it does the same thing, but using a while loop instead of a for loop. Assign the accumulated total in the while loop code to the variable sum2. Once complete, sum2 should equal sum1.

sum1 = 0

lst = [65, 78, 21, 33]

for x in lst:
sum1 = sum1 + x

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Apump is used to circulate hot water in a home heating system. water enters the well-insulated pump operating at steady state at a rate of 0.42 gal/min. the inlet pressure and temperature are 14.7 lbf/in.2, and 180°f, respectively; at the exit the pressure is 60 lbf/in.2 the pump requires 1/15 hp of power input. water can be modeled as an incompressible substance with constant density of 60.58 lb/ft3 and constant specific heat of 1 btu/lb or. neglecting kinetic and potential energy effects, determine the temperature change, in °r, as the water flows through the pump.
Answers: 1
question
Engineering, 04.07.2019 18:10
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
question
Engineering, 04.07.2019 18:10
Assuming compressible flow of air and that the measurements are done at flagstaff a pitot static tube that gives the difference of total and static pressure measures 0.35 m of mercury. what is the velocity of air? assume the temperature to be 300k. (submit your excel or matlab calculation sheet)
Answers: 1
question
Engineering, 04.07.2019 19:20
Brief discuss how the presence of dislocations in crystal structures can be an advantage and a disadvantage to engineer and designers.
Answers: 3
You know the right answer?
Please write the following code in Python 3. Also please show all output(s) and share your code.
Questions
question
English, 25.01.2021 14:00
question
Mathematics, 25.01.2021 14:00
question
Mathematics, 25.01.2021 14:00
question
Mathematics, 25.01.2021 14:00
question
Mathematics, 25.01.2021 14:00
Questions on the website: 13722362