1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lbvjy [14]
3 years ago
10

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

Engineering
1 answer:
maksim [4K]3 years ago
6 0

Answer:

sum2 = 0

counter = 0

lst = [65, 78, 21, 33]

while counter < len(lst):

   sum2 = sum2 + lst[counter]

   counter += 1

Explanation:

The counter variable is initialized to control the while loop and access the numbers in <em>lst</em>

While there are numbers in the <em>lst</em>,  loop through <em>lst</em>

Add the numbers in <em>lst</em> to the sum2

Increment <em>counter</em> by 1 after each iteration

You might be interested in
A large class with 1,000 students took a quiz consisting of ten questions. To get an A, students needed to get 9 or 10 questions
VMariaS [17]

Answer:

a. 0.11

b. 110 students

c. 50 students

d. 0.46

e. 460 students

f. 540 students

g. 0.96

Explanation:

(See attachment below)

a. Probability that a student got an A

To get an A, the student needs to get 9 or 10 questions right.

That means we want P(X≥9);

P(X>9) = P(9)+P(10)

= 0.06+0.05=0.11

b. How many students got an A on the quiz

Total students = 1000

Probability of getting A = 0.11 ---- Calculated from (a)

Number of students = 0.11 * 1000

Number of students = 110 students

So,the number of students that got A is 110

c. How many students did not miss a single question

For a student not to miss a single question, then that student scores a total of 10 out of possible 10

P(10) = 0.05

Total Students = 1000

Number of Students = 0.05 * 1000

Number of Students = 50 students

We see that 5

d. Probability that a student pass the quiz

To pass, a student needed to get at least 6 questions right.

So we want P(X>=6);

P(X>=) =P(6)+P(7)+P(8)+P(9)+P(10)

=0.08+0.12+0.15+0.06+0.05=0.46

So, the probability of a student passing the quiz is 0.46

e. Number of students that pass the quiz

Total students = 1000

Probability of passing the quiz = 0.46 ----- Calculated from (d)

Number of students = 0.46 * 1000

Number of students = 460 students

So,the number of students that passed the test is 460

f. Number of students that failed the quiz

Total students = 1000

Total students that passed = 460 ----- Calculated from (e)

Number of students that failed = 1000 - 460

Number of students that failed = 540

So,the number of students that failed is 540

g. Probability that a student got at least one question right

This means that we want to solve for P(X>=1)

Using the complement rule,

P(X>=1) = 1 - P(X<1)

P(X>=1) = 1 - P(X=0)

P(X>=1) = 1 - 0.04

P(X>=1) = 0.96

7 0
3 years ago
The inlet and exhaust flow processes are not included in the analysis of the Otto cycle. How do these processes affect the Otto
lara31 [8.8K]

Answer:

Suction and exhaust processes do not affect the performance of Otto cycle.

Explanation:

Step1

Inlet and exhaust flow processes are not including in the Otto cycle because the effect and nature of both the process are same in opposite direction.

Step2

Inlet process or the suction process is the process of suction of working fluid inside the cylinder. The suction process is the constant pressure process. The exhaust process is the process of exhaust out at constant pressure.

Step3

The suction and exhaust process have same work and heat in opposite direction. So, net effect of suction and exhaust processes cancels out. The suction and exhaust processes are shown below in P-V diagram of Otto cycle:

Process 0-1 is suction process and process 1-0 is exhaust process.

7 0
3 years ago
Two common methods of improving fuel efficiency of a vehicle are to reduce the drag coefficient and the frontal area of the vehi
qaws [65]

Answer:

\Delta V = 209.151\,L, \Delta C = 217.517\,USD

Explanation:

The drag force is equal to:

F_{D} = C_{D}\cdot \frac{1}{2}\cdot \rho_{air}\cdot v^{2}\cdot A

Where C_{D} is the drag coefficient and A is the frontal area, respectively. The work loss due to drag forces is:

W = F_{D}\cdot \Delta s

The reduction on amount of fuel is associated with the reduction in work loss:

\Delta W = (F_{D,1} - F_{D,2})\cdot \Delta s

Where F_{D,1} and F_{D,2} are the original and the reduced frontal areas, respectively.

\Delta W = C_{D}\cdot \frac{1}{2}\cdot \rho_{air}\cdot v^{2}\cdot (A_{1}-A_{2})\cdot \Delta s

The change is work loss in a year is:

\Delta W = (0.3)\cdot \left(\frac{1}{2}\right)\cdot (1.20\,\frac{kg}{m^{3}})\cdot (27.778\,\frac{m}{s})^{2}\cdot [(1.85\,m)\cdot (1.75\,m) - (1.50\,m)\cdot (1.75\,m)]\cdot (25\times 10^{6}\,m)

\Delta W = 2.043\times 10^{9}\,J

\Delta W = 2.043\times 10^{6}\,kJ

The change in chemical energy from gasoline is:

\Delta E = \frac{\Delta W}{\eta}

\Delta E = \frac{2.043\times 10^{6}\,kJ}{0.3}

\Delta E = 6.81\times 10^{6}\,kJ

The changes in gasoline consumption is:

\Delta m = \frac{\Delta E}{L_{c}}

\Delta m = \frac{6.81\times 10^{6}\,kJ}{44000\,\frac{kJ}{kg} }

\Delta m = 154.772\,kg

\Delta V = \frac{154.772\,kg}{0.74\,\frac{kg}{L} }

\Delta V = 209.151\,L

Lastly, the money saved is:

\Delta C = \left(\frac{154.772\,kg}{0.74\,\frac{kg}{L} }\right)\cdot (1.04\,\frac{USD}{L} )

\Delta C = 217.517\,USD

4 0
4 years ago
Water flows through a nozzle at the end of a fire hose. If the nozzle exit velocity must be 20 m/s and the exit diameter is 40 m
lara31 [8.8K]

Answer:

minimum flow rate provided by pump is 0.02513 m^3/s

Explanation:

Given data:

Exit velocity of nozzle = 20m/s

Exit diameter = 40 mm

We know that flow rate Q is given as

Q = A \times V

where A is Area

A =\frac{\pi}{4} \times (40\times 10^{-3})^2 = 1.256\times 10^{-3} m^2

Q = 1.256\times 10^{-3} \times 20 = 0.02513 m^3/s

minimum flow rate provided by pump is 0.02513 m^3/s

5 0
3 years ago
Who here is a genius?
Pachacha [2.7K]

Answer:

im kinda smart  whyy?

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • PLEASE HELP 100 POINTS!!! WILL MARK BRAINLIEST
    9·2 answers
  • A vehicle experiences hard shifting. Technician A says that the bell housing may be misaligned. Technician B says that incorrect
    5·1 answer
  • A column has a 4.8 cm by 8.7 cm rectangular cross section and a height 4 mm . The column is fixed at both ends and has a lateral
    6·1 answer
  • A closed system contains propane at 35°c. It produces 35 kW of work while absorbing 35 kW of heat. What is process? the temperat
    7·1 answer
  • Given the following materials and their corresponding thermal conductivity values, list them in order from most conductive to le
    12·1 answer
  • 1. Which type of fit implies that a piece will never fit? a. interference fit b. construction fit c. transition fit d. impeding
    8·1 answer
  • List one advantage and one disadvantage of the use of the commutator?
    8·1 answer
  • If the old radiator is replaced with a new one that has longer tubes made of the same material and same thickness as those in th
    10·1 answer
  • If the load parameters are: Vln=600kV, Il=100A (resistive), calculate the source voltage and current when the line is 50Miles (s
    14·1 answer
  • Aqueous cleaners are ________ parts cleaning agents.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!