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
A 360 kg/min stream of steam enters a turbine at 40 bar pressure and 100 degrees of superheat. The steam exits the turbine as a
Brrunno [24]
Answer:
skskkdkdkfkgkgkgkkgkgkgigooigigi lol
Explanation:
Oof
7 0
2 years ago
A step-up transformer has 20 primary turns and 400 secondary turns. If the primary current is 30 A, what is the secondary curren
-BARSIC- [3]
150
A
Explanation:
V
s
V
p
=
N
s
N
p

(
1
)
N
refers to the number of turns
V
is voltage
s
and
p
refer to the secondary and primary coil.
From the conservation of energy we get:
V
p
I
p
=
V
s
I
s

(
2
)
From
(
1
)
:
V
s
V
p
=
900
00
3
00
=
300
∴
V
s
=
300
V
p
Substituting for
V
s
into
(
2
)
⇒
V
p
I
p
=
300
V
p
×
0.5
∴
I
p
=
150
A
Seems a big current.
3 0
3 years ago
Why do giant stars become planetary nebulas while supergiant stars become supernovas when their nuclear fusion slows and is over
sashaice [31]

The reason why giant stars become planetary nebulas is  Supergiant stars do not have enough mass to generate the gravity necessary to cause a planetary nebula.

<h3>Why do giant stars become planetary nebulae?</h3>

A planetary nebula is known to be formed or created by a dying star. A red giant is known to be unstable and thus emit pulses of gas that is said to form a sphere around the dying star and thus they are said to  be ionized by the ultraviolet radiation that the star is known to releases.

Learn more about  giant stars from

brainly.com/question/27111741

#SPJ1

3 0
2 years ago
____ grinders are used to grind diameters, shoulders, and faces much like the lathe is used for turning, facing, and boring oper
skelet666 [1.2K]

Answer:

Cylindrical

Explanation:

<em>A cylindrical grinder </em><em>is a tool for shaping the exterior of an item. Although cylindrical grinders may produce a wide range of forms, the item must have a central axis of rotation. Shapes such as cylinders, ellipses, cams, and crankshafts are examples of this.</em><em> Cylindrical grinding</em><em> machines are specialized grinding machines that are used to process cylinders, rods, and similar workpieces. The cylinders revolve in one direction between two centers, while the grinding wheel or wheels are close together and rotate in the other direction.</em>

8 0
2 years ago
An electric motor is to be supported by four identical mounts. Each mount can be treated as a linear prevent problems due requir
Artyom0805 [142]

GIVEN:

Amplitude, A = 0.1mm

Force, F =1 N

mass of motor, m = 120 kg

operating speed, N = 720 rpm

\frac{A}{F} =  \frac{0.1\times 10^{-3}}{1} = 0.1\times 10^{-3}

Formula Used:

A = \frac{F}{\sqrt{(K_{t} - m\omega ^{2}) +(\zeta \omega ^{2})}}

Solution:

Let Stiffness be denoted by 'K' for each mounting, then for 4 mountings it is 4K

We know that:

\omega = \frac{2 \pi\times N}{60}

so,

\omega = \frac{2 \pi\times 720}{60} = 75.39 rad/s

Using the given formula:

Damping is negligible, so, \zeta = 0

\frac{A}{F} will give the tranfer function

Therefore,

\frac{A}{F} = \frac{1}{\sqrt{(4K - 120\ ^{2})}}

0.1\times 10^{-3} =  \frac{1}{\sqrt{(4K - 120\ ^{2})}}

Required stiffness coefficient, K = 173009 N/m = 173.01 N/mm

8 0
3 years ago
Other questions:
  • The kinetic energy correction factor depends on the (shape — volume - mass) of the cross section Of the pipe and the (velocity —
    11·1 answer
  • Why is a crank-rocker mechanism more useful than a double-rocker mechanism?
    13·1 answer
  • 37. In ______ combination of drugs, the effects of one drug cancel or diminish
    12·1 answer
  • What's the best way to find the load capacity of a crane? Select the best option. Call the manufacturer Ask co-workers Look at t
    8·1 answer
  • Using the data from the table, what is P(3)?!
    9·1 answer
  • Contrast the electron and hole drift velocities through a 10 um (micro meter) layer of intrinsic silicon across which a voltage
    11·1 answer
  • The distribution of ground shaking around the fault
    5·1 answer
  • I need to solve for d
    11·2 answers
  • Drivers education :Anything that draws your mind off driving is
    9·1 answer
  • From the list of problems below, check all that are known to be NP-complete. You do not need to justify your answer. (Set cover)
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!