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
Alona [7]
3 years ago
13

12.28 LAB: Output values in a list below a user defined amount - functions Write a program that first gets a list of integers fr

om input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, and output all integers less than or equal to that value. Ex: If the input is: 5 50 60 140 200 75 100 the output is: 50 60 75 The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75.
Engineering
1 answer:
Anastaziya [24]3 years ago
8 0

Answer:

def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold):

   for value in user_values:

       if value < upper_threshold:

           print(value)  

def get_user_values():

   n = int(input())

   lst = []

   for i in range(n):

       lst.append(int(input()))

   return lst  

if __name__ == '__main__':

   userValues = get_user_values()

   upperThreshold = int(input())

   output_ints_less_than_or_equal_to_threshold(userValues, upperThreshold)

You might be interested in
Mohr's circle represents: A Orientation dependence of normal and shear stresses at a point in mechanical members B The stress di
blsea [12.9K]

Answer:

The correct answer is A : Orientation dependence of normal and shear stresses at a point in mechanical members

Explanation:

Since we know that in a general element of any loaded object the normal and shearing stresses vary in the whole body which can be mathematically represented as

\sigma _{x'x'}=\frac{\sigma _{xx}+\sigma _{yy}}{2}+\frac{\sigma _{xx}-\sigma _{yy}}{2}cos(2\theta )+\tau _{xy}sin(2\theta )

And \tau _{x'x'}=-\frac{\sigma _{xx}-\sigma _{yy}}{2}sin(2\theta )+\tau _{xy}cos(2\theta )

Mohr's circle is the graphical representation of the variation represented by the above 2 formulae in the general oriented element of a body that is under stresses.

The Mohr circle is graphically displayed in the attached figure.

4 0
2 years ago
Calculate the wire pressure for a round copper bar with an original cross-sectional area of 12.56 mm2 to a 30% reduction of area
dybincka [34]

Answer:153.76 MPa

Explanation:

Initial Area\left ( A_0\right )=12.56 mm^2

Final Area\left ( A_f\right )=0.7\times 12.56 mm^2=8.792 mm^2

Die angle=30^{\circ}

\alpha =\frac{30}{2}=15^{\circ}

\mu =0.08

Yield stress\left ( \sigma _y \right )=350 MPa

B=\mu cot\left ( \aplha\right )=0.2985

\sigma _{pressure}=\sigma _y\left [\frac{1+B}{B}\right ]\left [ 1-\frac{A_f}{A_0}\right ]^B

\sigma _{pressure}=350\left [\frac{1+0.2985}{0.2985}\right ]\left [ 1-\frac{8.792}{12.56}\right ]^{0.2985}

\sigma _{pressure}=153.76 MPa

8 0
3 years ago
How to update android 4.4.2 to 5.1​
faust18 [17]

Answer:

try settings and go to updates?

Explanation:

8 0
2 years ago
Technician A says automotive gasoline engines run on the 2 stroke principal. Technician B says Diesel engine hace less compressi
d1i1m1o1n [39]

Answer:

both are incorect

Explanation:

2 stroke principal is a mix of gasoline and engine oil a normal gasoline engine does not run on 2 stroke fuel

technician B is also wrong Diesel engines generally generate much higher compersion than gasoline engines

3 0
2 years ago
A fatigue test was conducted in which the mean stress was 90 MPa (13050 psi), and the stress amplitude was 190 MPa (27560 psi).
Gwar [14]

Answer:

a) 280MPa

b) -100MPa

c) -0.35

d) 380 MPa

Explanation:

GIVEN DATA:

mean stress \sigma_m = 90MPa

stress amplitude \sigma_a = 190MPa

a) \sigma_m =\frac{\sigma_max+\sigma_min}{2}

    90 =\frac{\sigma_{max}+\sigma_{min}}{2} --------------1

\sigma_a =\frac{\sigma_{max}-\sigma_{min}}{2}

   190 = \frac{\sigma_{max}-\sigma_{min}}{2} -----------2

solving 1 and 2 equation we get

\sigma_{max} = 280MPa

b) \sigma_{min} = - 100MPa

c)

stress ratio=\frac{\sigma_{min}}{\sigma_{max}}

=\frac{-100}{280} = -0.35

d)magnitude of stress range

                      =(\sigma_{max} -\sigma_{min})

                       = 280 -(-100) = 380 MPa

3 0
3 years ago
Other questions:
  • To make 1000 containers of ice cream you need: 600 gallons of milk, 275 gallons of cream, and 120 gallons of flavor. Each ingred
    12·1 answer
  • How do you make coke for steel?
    14·1 answer
  • A part made from annealed AISI 1018 steel undergoes a 20 percent cold-work operation. Obtain the yield strength and ultimate str
    10·1 answer
  • 12. Dies are turned using a special tool called a/an
    10·1 answer
  • What is something that a robot or computer program might do that requires a decision, or conditional statement?
    9·1 answer
  • Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's
    11·2 answers
  • The present worth of income from an investment that follows an arithmetic gradient is projected to be $475,000. The income in ye
    9·1 answer
  • 14. The maximum amount a homeowner should spend on housing is
    11·1 answer
  • Which of the following sensors is used to provide suspension control module with feedback regarding vehicle cornering​ forces?
    8·1 answer
  • the left rear brake drum is scored, but the right rear drum looks as good as new. technician a says the left-side drum should be
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!