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
A collection of electrons in one place is known as what
quester [9]
A collection of electrons lol
8 0
3 years ago
Two transmission belts pass over a double-sheaved pulley that is attached to an axle supported by bearings at A and D. The radiu
Fynjy0 [20]

Answer:

Check the explanation

Explanation:

Kindly check the attached image below to see the step by step explanation to the question above.

6 0
4 years ago
An engineers scale is generally used to _______.
Bumek [7]
Measure scale on technical drawings.
7 0
3 years ago
A completely reversible heat pump produces heat at a rate of 300 kW to warm a house maintained at 24 °C. The exterior air, which
trapecia [35]

Answer:

No.

Explanation:

The Coefficient of Performance of the reversible heat pump is determined by the Carnot's cycle:

COP_{HP} = \frac{T_{H}}{T_{H}-T_{L}}

COP_{HP} = \frac{297.15\,K}{297.15\,K-280.15\,K}

COP_{HP} = 3.339

The power required to make the heat pump working is:

\dot W = \frac{300\,kW}{3.339}

\dot W = 89.847\,kW

The heat absorbed from the exterior air is:

\dot Q_{L} = 300\,kW - 89.847\,kW

\dot Q_{L} = 210.153\,kW

According to the Second Law of Thermodynamics, the entropy generation rate in a reversible cycle must be zero. The formula for the heat pump is:

\frac{\dot Q_{L}}{T_{L}} - \frac{\dot Q_{H}}{T_{H}} + \dot S_{gen} = 0

\dot S_{gen} = \frac{\dot Q_{H}}{T_{H}} - \frac{\dot Q_{L}}{T_{L}}

\dot S_{gen} = \frac{300\,kW}{297.15\,K}-\frac{210.153\,kW}{280.15\,K}

\dot S_{gen} = 0.259\,\frac{kW}{K}

Which contradicts the reversibility criterion according to the Second Law of Thermodynamics.

5 0
3 years ago
Insulated Gas Turbine Air enters an adiabatic gas turbine at 1050 K and 1 MPa and leaves at 400 kPa. Kinetic and potential energ
EleoNora [17]

Answer:A certain vehicle loses 3.5% of its value each year. If the vehicle has an initial value of $11,168, construct a model that represents the value of the vehicle after a certain number of years. Use your model to compute the value of the vehicle at the end of 6 years.

A certain vehicle loses 3.5% of its value each year. If the vehicle has an initial value of $11,168, construct a model that represents the value of the vehicle after a certain number of years. Use your model to compute the value of the vehicle at the end of 6 years.

Explanation:A certain vehicle loses 3.5% of its value each year. If the vehicle has an initial value of $11,168, construct a model that represents the value of the vehicle after a certain number of years. Use your model to compute the value of the vehicle at the end of 6 years.

4 0
3 years ago
Other questions:
  • Students are expected to respond to one of the two questions described below. Students should provide examples to clarify their
    12·1 answer
  • Select the best answer to the questo
    5·2 answers
  • In details and step-by-step, show how you apply the Bubble Sort algorithm on the following list of values. Your answer should sh
    15·1 answer
  • A water agency stated that waterlines cannot have water flowing faster than 8 ft/s. What is the minimum standard pipe diameter t
    12·1 answer
  • A four-cylinder, four-stroke internal combustion engine has a bore of 3.7 in. and a stroke of 3.4 in. The clearance volume is 16
    8·1 answer
  • What is this i dont understand this at all
    9·1 answer
  • If the tank is designed to withstand a pressure of 5 MPaMPa, determine the required minimum wall thickness to the nearest millim
    8·1 answer
  • Market research is a good place to start the design process and usually involves asking questions about consumers.
    5·1 answer
  • identify which country has an absolute advantage in production of cookies and which has the absolute advantage in production of
    12·1 answer
  • How do you check battery state of charge with a voltmeter
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!