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
What did the discovery of the Cumberland Gap mean for exploration? PLEASE HELP ILL GIVE YOU BRAINLEIST!
Flauer [41]

Answer: D. Many more people crossed the mountains and settled between the Appalachians and the Mississippi

Explanation:

It was quite difficult to cross the Appalachian mountains at the time of the American colonies which led to the colonies being confined to the east of it.

This was until the late 1700s when Daniel Boone and a team of explorers heard that a path existed through the Appalachians and had been used by natives for a long time. After discovering this ''gap'' which was then named after an English prince, many more people were able to use it to settle more to the west of the continent.

6 0
3 years ago
Consider a steady isentropic airflow through a convergent channel with an inletto-exit cross section area ratio of 2. If the inl
Nina [5.8K]

Answer:

for m1=0.2

M2=0.4

for m1=2.5

M2=5

1=  channel input

2.channel output

Explanation:

Hello!

To solve this problem follow the steps below!

1.As it is an isentropic system, it means that the temperature of the fluid remains constant, so the volumetric flow is the same, remember that this is calculated by calculating the product between the velocity and the area.

V1A1=V2A2

1=  channel input

2.channel output

We can divide both sides of the equation by the speed of sound(V)

\frac{V1}{V}A1= \frac{V2}{V}A2

2. The mach number is defined as the ratio between the speed of a fluid and the speed of sound,

we rearrange the equation

M1A1=M2A2

\frac{M1A1}{A2} =M2

3.Now considering that the channel is convergent and that the ratio between the areas is 2, we have the following equation (A1 / A2 = 2)

M1(2)=M2

4.Finally we solve for the number of mach indicated (0.2 and 2.5)

for m1=0.2

0.2(2)=M2=0.4

for m1=2.5

2.5(2)=M2=5

8 0
3 years ago
In urban area you can except
liberstina [14]

Answer:

eoidnfoejsdncodsnc

Explanation:

dfdjsncojnsdjcnsdojnvjsdvkjsdkjvnsdjvnskjnvkjdvkjnsdcjndkjndskjndskjndskjnsdvkjnvsdkjvsdkjnvskdjnvkjdsvkjsdnvkjsdnkjsvnkj

5 0
3 years ago
List three technologies that pose ethical dilemmas?
Setler [38]
Hacking into medical devices
3-D printing
Driverless Zipcars
6 0
3 years ago
Most ceilings are covered with plaster or…
Monica [59]

Explanation:

Most ceilings are coverd with plaster or board.

8 0
4 years ago
Read 2 more answers
Other questions:
  • ) A 20 ft horizontal beam is attached to a wall with a fixed support. If the beam is subjected to the distributed loads indicate
    12·1 answer
  • The displacement volume of an internal combustion engine is 3 liters. The processes within each cylinder of the engine are model
    10·1 answer
  • An airplane tows a banner that is b = 0.8 m tall and ℓ = 25.0 m long at a speed of 150 km/hr. (a) If the drag coefficient based
    12·1 answer
  • Explain why the scenario below fails to illustrate an understanding of the importance of metrology. Situation: Natalie is a cali
    6·1 answer
  • What makes building an airplane while flying so difficult?
    5·1 answer
  • To practice my skills, Jesse asked me to create an imaginary project with at least 12 tasks, which include dependent, multiple p
    8·1 answer
  • Two bodies have heat capacities (at constant volume) c, = a and c2 = bT and are thermally isolated from the rest of the universe
    14·1 answer
  • This elementary problem begins to explore propagation delayand transmission delay, two central concepts in data networking. Cons
    6·1 answer
  • Where can I find solved problems of advanced soil structure interaction?​
    6·2 answers
  • Nowadays power supply on board ship is determine low and high voltage. From what range low &amp; high voltage is being determine
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!