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
riadik2000 [5.3K]
4 years ago
9

Codio Challenge Activity Python

Engineering
1 answer:
Studentka2010 [4]4 years ago
8 0

Answer:

You can use the following code in order to generate the odd and even lists separately:

def splitOddEven(number_list):

"""it separate a list of numbers into odd and even"""

odd_list = [];

even_list = [];

while(number_list):

 current_number = number_list.pop();

 if(current_number % 2 == 0):

  even_list.append(current_number)

 else:

  odd_list.append(current_number)

 

return (even_list, odd_list)

 

test_list = [2,3,1,5,78,32,121,12]

even, odd = splitOddEven(test_list[:])

print("These are the even numbers of your list:" + str(even))

print("\nThese are the odd numbers of your list: " + str(odd))

Explanation:

You might be interested in
What is the difference between the pressure head at the end of a 150m long pipe of diameter 1m coming from the bottom of a reser
uysha [10]

Answer:

\frac {p_2- p_1}{\rho g} = 31.06 m

Explanation:

from bernoulli's theorem we have

\frac{p_1}{\rho g} + \frac{v_1^{2}}{2g} +z_1 = \frac{p_2}{\rho g} + \frac{v_2^{2}}{2g} +z_2  + h_f

we need to find pressure head difference i.e.

\frac {p_2- p_1}{\rho g} = (z_1 - z_2) - h_f

where h_f id head loss

h_f = \frac{flv^{2}}{D 2g}

velocity v =\frac{1}{n} * R^{2/3} S^{2/3}

S = \frac{\delta h}{L} = \frac{40}{150} = 0.267

hydraulic mean radius R =\frac{A}{P} = \frac{hw}{2h+w}

R = \frac{40*1}{2*40+1} = 0.493 m

so velocity is  =\frac{1}{0.013} * 0.493^{2/3} 0.267^{1/2}

v = 24.80 m/s

head loss

h_f = \frac{0.0019*150*24.80^{2}}{1* 2*9.81}

h_f  =8.93 m

pressure difference is

\frac {p_2- p_1}{\rho g} = 40 - 8.93 = 31.06 m

\frac {p_2- p_1}{\rho g} = 31.06 m

4 0
3 years ago
You are an engineer at company XYZ, and you are dealing with the need to determine the maximum load you can apply to a set of bo
qwelly [4]

Answer:

a)

F_i = 28.8 kN

b)

Alternating and mean forces on the bolt are 0.85 kN and 29.65 kN respectively.

Mean and alternating stresses in the bulk of the bolt are 378 MPa and 10 MPa.

c)

Safety factor = 5.5

Explanation:

Basic Dimension of Isometric Screw thread" is considered for analysis.

At Nominal diameter, d = 12 mm , A_t = 84.3mm^{2} , F_i = 0.9A_tS_p , S_p = 380 MPa

Rolled threads; K_f = 2.2

8 0
3 years ago
1. A pipeline constructed of carbon steel failed after 3 years of operation. On examination it was found that the wall thickness
jek_recluse [69]

Answer:

check the explanation

Explanation:

1.

Thickness Loss = t =\frac{t_{o}-t_{i}}{2} = \frac{114.3-102.3}{2} = 2mm

t_{f} = \frac{1}{2}*6 = 3mm

Hence Rate of Corrosion = 6*\frac{1-0.5}{3} = 1mm/year = 0.03 inches per year

2.

As the expected future life is 7 years,

40 carbon steel pipe has to be replaced every 3 years as given in the question,

Cost per unit length is the sum of material cost and installation cost.

Cost of 40 carbon steel = (5 dollars + 16.5 dollars) * 3 = 64.5 dollars

For 80 carbon steel pipe, first calculate the thickness loss,

\frac{114.3-97.2}{2} = 8.55mm

The critical thickness is given to be 3mm, Hence change in thickness is 8.55-3 = 5.5mm

This 80 carbon steel pipe has to be replaced one more time

Hence, Cost per unit length is the sum of material cost and installation cost.

Cost of 80 carbon steel = (8.3 dollars + 16.5 dollars) * 2 = 49.6 dollars

The best is of stainless steel which does not undergo corrosion at all and thus it needs to be replaced only once throughout the plant operation. Its cost = 24.8 dollars + 16.5 dollars = 41.3 dollars

Hence, stainless steel is the recommended pipe to be used.

3 0
3 years ago
A 0.25" diameter A36 steel rivet connects two 1" wide by .25" thick 6061-T6 Al strips in a single lap shear joint. The shear str
just olya [345]

Answer:

Option B

1025 psi

Explanation:

In a single shear, the shear area is \frac {\pi d^{2}}{4}=\frac {\pi 0.25^{2}}{4}

The shear strength=0.58\sigma_y and in this case \sigma_y=36 000 psi

Shear strength=\frac {Load}{Shear area} hence making load the subject then

Load=Shear area X Shear strength

Load=\frac {\pi 0.25^{2}}{4} \times 0.58\times 36000\approx 1025 psi

3 0
3 years ago
Consider a CMOS inverter which has ideal transistors with the following characteristics: PMOS transistor: W/L = 2; Mobility (up)
yaroslaw [1]

Answer:

The transistor will be in amplifier mode and we will expect current will be higher than expected.

6 0
3 years ago
Other questions:
  • How I do I get nut out of sheets​
    8·2 answers
  • A consultant has proposed that a pulse-jet baghouse with bags that are 15 cm in diameter and 5 m in length. Estimate the net num
    15·1 answer
  • If a building is too humid, what harmful substance may be stored there?
    13·2 answers
  • Project 8:The Harris-Benedict equation estimates the number of calories your body needs to maintain your weight if you do no exe
    5·1 answer
  • I need solution for this question ​
    10·1 answer
  • How long does it take to get a master's degree in Mechanical engineering?
    12·1 answer
  • The current flow in an NMOS transistor is due to one of the following:
    11·1 answer
  • After adjusting your seat, your___ should be as closest possible to the back rest.
    14·1 answer
  • A___ remote control can be an advantage to an
    14·2 answers
  • HOLA COMO ESTAN TODOS
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!