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
What’s the purpose of current tracks
Taya2010 [7]

Answer:

What's the purpose of tracks going in the red? Having tracks go into the red is surely redundant, I don't see any purpose in having tracks distort ... It just seems like a hang on from the old days of tape, it's something that people who ... be in daws and I'm trying to assemble an alternative I understand the current mixing system. The Dow Jones Industrial Average (DJIA) is a stock index of 30 blue-chip industrial ... Today, the DJIA is a benchmark that tracks American stocks that are ... To calculate the DJIA, the current prices of the 30 stocks that make up the ... the longevity of the Dow serves this purpose better than all other indices.

Explanation:

3 0
3 years ago
The cube measures 3.0-ft on all sides and has a density of 3.1 slugs/ft3. How much does it weigh?
kodGreya [7K]

Answer:

W = 2695.14 lb

Explanation:

given,

side of cube = 3 ft

density of the cube = 3.1 slugs/ft³

we know,

density = \dfrac{mass}{volume}

mass = density x volume

volume = 3³ = 27 ft³

mass =  3.1  x 27

    m = 83.7 slugs.

weight calculation

converting mass from slug to pound

weight of 1 slug is equal to 32.2 lb

now,

weight of the cube is equal to

  W = 83.7 slugs x 32.2 lb/slug

  W = 2695.14 lb

hence, weight is equal to W = 2695.14 lb

4 0
3 years ago
The complex power of a load is 10-10j VA. What component should be added in parallel with the load so that the new load has a un
Korolek [52]
Need points bdjdjdhdhd
7 0
3 years ago
Anaircraft component is fabricated from an aluminum alloy that has a plane-strain fracture toughness of 40 MPa 1/2.It has been d
navik [9.2K]

Answer:

Yes, fracture will occur since toughness (42.4 MPa) is greater than the toughness of the material, 40MPa

Explanation:

Given

Toughness, k = 40Mpa

Stress, σ = 300Mpa

Length, l = 4mm = 4 * 10^-3m

Under which fracture occurred (i.e., σ= 300 MPa and 2a= 4.0 mm), first we solve for parameter Y (The dimensionless parameter)

Y = k/(σπ√a)

Where a = ½ of the length in metres

Y = 40/(300 * π * √(4/2 * 10^-3))

Y = 1.68 ---- Approximated

To check if fracture will occur of not; we apply the same formula.

Y = k/(σπ√a)

Then we solve for k, where

σ = 260Mpa and a = ½ * 6 * 10^-3

So,.we have

1.68 = k/(260 * π * √(6*10^-3)/2)

k = 1.68 * (260 * π * (6*10^-3)/2)

k = 42.4 MPa --- Approximately

Therefore, fracture will occur since toughness (42.4 MPa) is greater than the toughness of the material, 40 MPa

7 0
3 years ago
Read 2 more answers
• What are some methods currently used to unclog arteries and keep them clear?
topjm [15]
Good fats are also called unsaturated fats. They're found in foods like olives, nuts, avocado, and fish. Cut sources of saturated fat, such as fatty meat and dairy. Choose lean cuts of meat, and try eating more plant-based meals.
5 0
3 years ago
Other questions:
  • The statement that is NOT true about the concept of a boundary layer on an object is: a. the Reynolds number is greater than uni
    6·1 answer
  • A steam turbine receives 8 kg/s of steam at 9 MPa, 650 C and 60 m/s (pressure, temperature and velocity). It discharges liquid-v
    7·1 answer
  • A heat pump designer claims to have an air-source heat pump whose coefficient of performance is 1.8 when heating a building whos
    10·1 answer
  • Unit for trigonometric functions is always "radian". 1. 10 points: Do NOT submit your MATLAB code for this problem (a) Given f(x
    9·1 answer
  • Please answer question #2
    6·1 answer
  • PLEASE HELP ME!!!!!! 100 POINTS FOR HELPFUL ANSWERS + BRAINLIEST!!!!!
    14·2 answers
  • Engineering Specificaitons is ...
    9·1 answer
  • Plz help If an item is $13.00 for a case of 24, then it is $
    11·2 answers
  • Why is “land-use planning” an appropriate name for urban planning?
    8·2 answers
  • QUICK ASAP!!!
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!