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
den301095 [7]
3 years ago
14

Python Codio Question:

Engineering
1 answer:
tester [92]3 years ago
7 0

Answer:

# -*- coding: utf-8 -*-

# Get N from the command line

import sys

N = int(sys.argv[1])

if N > 0: #N is positive  

   positve = list(range(N,0,-1))

   print(positve)

elif N < 0: #N is negative  

   negative = list(range(N,0,1))

   print(negative)

else:

   print("Invalid in input")

Explanation:

First, you need to identify if the number entered is positive, negative or none of them, for that we use one if, one elif and one else statement:

  • If the number entered (N) is greater than zero (is positive) we print a list in the range N to 0 in steps of minus one, the zero is not printed because the function range by default omits the last value
  • If the previous statement was False and the number entered is smaller than zero (is negative) we print a list in the range N to 0 in steps of one, the zero is not printed because the function range by default omits the last value
  • Finally, if the two previous events were false print invalid input

You might be interested in
How does the clearance volume affect the efficiency of the Otto cycle?
eduard

Answer:

Explanation:

A smaller clearance volume means a higher compression. A higher compression means better thermal efficiency. However a compression ratio too high might be troublesome, as it can cause accidental ignition of the fuel-air mix. This is the reason why Otto cycle engines have lower compressions that Diesel engines. In a Diesel engine the mix ignites by compression instead of a spark.

7 0
3 years ago
What is capillary action?
BARSIC [14]
Capillary action occurs When the adhesion to the walls stronger than dirt cohesive forces between a liquid molecules. the head towards Capillery action will take water in a uniform circular is limited by surface tension and, of course, gravity.
4 0
2 years ago
A relatively nonvolatile hydrocarbon oil contains 4.0 mol % propane and is being stripped by direct superheated steam in a strip
hram777 [196]

Answer:

Number of Trays = Six (6)

Explanation:

Given that: y' = 25x' , in terms of molecular ratio, we can write it as

\frac{Y'}{1 + Y'} =25 \frac{X'}{1 + X'}  ......... 1

after plotting this we get equilibrium curve as shown in the attached picture.

inlet concentration and outlet concentration of liquid phase is

x₂ = 4% = 0.04 (inlet)

so that can be converted into molar

X_2 = \frac{x_2}{1-x_2} = \frac{0.04}{1-0.04} = 0.04167

and

x₁ = 0.2% = 0.002

X_1 = \frac{x_1}{1-x_1} = \frac{0.002}{1-0.002} = 2.004*10^{-3}

Now we have to use the balance equation a

\frac{G_s}{L_s} = \frac{X_2-X_1}{Y_2-Y_1} .............. a

here amount of solute is comparably lower than

Here we have

L = 300 kmol (total)

L_s = 300(1 - 0.04) = 288 kmol pure oil

G = G_s = 11.42 kmol

Y_1 = 0 , solvent free steam

substitute into the equation a

\frac{11.42}{288} = \frac{0.04167 - 2*10^{-3}}{Y_2 - 0}

Y₂ = 1.0003

Now plot the point A(X₁ , Y₁) and B(X₂ , Y₂) and join them to construct operating line AB.

Starting from point B, stretch horizontal line up to equilibrium curve and from there again go down to operating line as shown in the picture attached. This procedure give one count of tray and continue the same procedure up to end of operating.

at last count, the number of stage, gives 6.

∴ <em>Number of trays = 6</em>

5 0
4 years ago
Read 2 more answers
calculate force and moment reactions at bolted base O of overhead traffic signal assembly. each traffic signal has a mass 36kg,
Igoryamba

Answer:

The free body diagram of the system is, 558 368 368 508 O ?? O, Consider the equilibrium of horizontal forces. F

Explanation:

I hope this helps you but I think and hope this is the right answer sorry if it’s wrong.

7 0
3 years ago
In a shear box test on sand a shearing force of 800 psf was applied with normal stress of 1750 psf. Find the major and minor pri
ryzh [129]

Answer:

The major and minor stresses are as 2060.59 psf, -310.59 psf and 1185.59 psf.

Explanation:

The major and minor principal stresses are given as follows:

\sigma_{max}=\dfrac{\sigma_x+\sigma_y}{2}+\sqrt{\left(\dfrac{\sigma_x-\sigma_y}{2}\right)^2+\tau_{xy}^2}

\sigma_{min}=\dfrac{\sigma_x+\sigma_y}{2}-\sqrt{\left(\dfrac{\sigma_x-\sigma_y}{2}\right)^2+\tau_{xy}^2}

Here

  • \sigma_x is the normal stress which is 1750 psf
  • \sigma_y is 0
  • \tau_{xy} is the shear stress which is 800 psf

So the formula becomes

\sigma_{max}=\dfrac{\sigma_x+\sigma_y}{2}+\sqrt{\left(\dfrac{\sigma_x-\sigma_y}{2}\right)^2+\tau_{xy}^2}\\\sigma_{max}=\dfrac{1750+0}{2}+\sqrt{\left(\dfrac{1750-0}{2}\right)^2+(800)^2}\\\sigma_{max}=875+\sqrt{\left(875)^2+(800)^2} \\\sigma_{max}=875+\sqrt{765625+640000}\\\sigma_{max}=875+1185.59\\\sigma_{max}=2060.59 \text{psf}

Similarly, the minimum normal stress is given as

\sigma_{min}=\dfrac{\sigma_x+\sigma_y}{2}-\sqrt{\left(\dfrac{\sigma_x-\sigma_y}{2}\right)^2+\tau_{xy}^2}\\\sigma_{min}=\dfrac{1700+0}{2}-\sqrt{\left(\dfrac{1700-0}{2}\right)^2+(800)^2}\\\sigma_{min}=875-\sqrt{(875)^2+(800)^2}\\\sigma_{min}=875-\sqrt{765625+640000}\\\sigma_{min}=875-1185.59\\\sigma_{min}=-310.59 \text{ psf}

The maximum shear stress is given as

\tau_{max}=\dfrac{\sigma_{max}-\sigma_{min}}{2}\\\tau_{max}=\dfrac{2060.59-(-310.59)}{2}\\\tau_{max}=\dfrac{2371.18}{2}\\\tau_{max}=1185.59 \text{psf}

5 0
3 years ago
Other questions:
  • Jeremih pegues sometimes
    12·2 answers
  • Assume that in orthogonal cutting the rake angle is 15° and the coefficient of friction is 0.15. a. Determine the percentage cha
    14·1 answer
  • MITM can present in two forms: eavesdropping and manipulation. Discuss the process involved when an attacker is eavesdropping an
    15·1 answer
  • A gas turbine has a thermal efficiency of 20% and develops a power output of 8 MW. Determine the fuel consumption rate if heatin
    5·1 answer
  • A desktop computer is to be cooled by a fan whose flow rate is 0.34 m3 /min. Determine the mass flow rate of air through the fan
    11·1 answer
  • A process consists of two steps: (1) One mole of air at T = 800 K and P = 4 bar is cooled at constant volume to T = 350 K. (2) T
    7·1 answer
  • : During a heavy rainstorm, water from a parking lot completely fills an 18-in.- diameter, smooth, concrete storm sewer. If the
    6·1 answer
  • Tin atoms are introduced into an FCC copper ,producing an alloy with a lattice parameter of 4.7589×10-8cm and a density of 8.772
    9·1 answer
  • Método de Programación lineal utilizado para resolver problemas en teoría de redes?
    15·1 answer
  • IM JI Suneou uo mm
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!