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
The bulk density of a compacted soil specimen (Gs = 2.70) and its water content are 2060 kg/m^3 and 15.3%, respectively. If the
yaroslaw [1]

Answer:

the saturated density should be

Explanation:

4 0
3 years ago
I don't know what is this​
pychu [463]
That means “ if possible then link”
8 0
3 years ago
Consider two Carnot heat engines operating in series. The first engine receives heat from the reservoir at 1400 K and rejects th
Aleksandr-060686 [28]

Answer:

The temperature T= 648.07k

Explanation:

T1=input temperature of the first heat engine =1400k

T=output temperature of the first heat engine and input temperature of the second heat engine= unknown

T3=output temperature of the second heat engine=300k

but carnot efficiency of heat engine =1 - \frac{Tl}{Th} \\

where Th =temperature at which the heat enters the engine

Tl is the  temperature of the environment

since both engines have the same thermal capacities <em>n_{th} </em> therefore n_{th} =n_{th1} =n_{th2}\\n_{th }=1-\frac{T1}{T}=1-\frac{T}{T3}\\ \\= 1-\frac{1400}{T}=1-\frac{T}{300}\\

We have now that

\frac{-1400}{T}+\frac{T}{300}=0\\

multiplying through by T

-1400 + \frac{T^{2} }{300}=0\\

multiplying through by 300

-420000+ T^{2} =0\\T^2 =420000\\\sqrt{T2}=\sqrt{420000}  \\T=648.07k

The temperature T= 648.07k

5 0
3 years ago
Write a system of equations to describe the situation below, solve using any method, and fill in the blanks.
Ann [662]

The number of tubs that each of them sold is; 24 tubs each

The number of days it will take for both of them to sell same amount of tubs is; 4 days

Number of cookies that Nicole had already sold = 4 tubs

Number of cookies sold by Josie before counting = 0 cookies

Nicole now sells 5 tubs per day and

Josie now sells 6 tubs per day.

Let the number of days it will take for them to have sold the same amount of cookies be d.

Thus;

5d + 4 = 6d + 0

6d - 5d = 4

d = 4 days

Thus, total number of cookies for both are;

Total for Nicole = 4 + 5(4) = 24 cookies

Total for Josie = 6(4) = 24 cookies

Read more about proportion at; brainly.com/question/870035

6 0
3 years ago
Engineers in Russia invented a new way to create colorful art with a __________.
Setler [38]

The Engineers in Russia invented a new way to create colorful art with constructivist art.

<h3>What is constructivist art?</h3>

Constructivist art was aimed to reflect modern industrial society and urban space in art. It uses industrial production forms and modest materials for its art production.

The constructivists proposed to replace traditional art's with a focus on construction as Engineers rather than a painter.

Therefore, the Engineers in Russia invented a new way to create colorful art with constructivist art using construction.

Learn more on constructivist here,

brainly.com/question/14054863

3 0
3 years ago
Other questions:
  • Soap is a very interesting chemical. We even discussed it on the discussion board. How does it work, exactly?
    7·1 answer
  • A hanging wire made of an alloy of nickel with diameter 0.19 cm is initially 2.8 m long. When a 59 kg mass is hung from it, the
    15·1 answer
  • Name two types of battery chargers that are used in mechanics
    14·1 answer
  • (a) Consider a germanium semiconductor at T 300 K. Calculate the thermal equilibrium electron and hole concentrations for (i) Nd
    7·1 answer
  • The rate at which velocity changes is called?
    5·2 answers
  • A long bone is subjected to a torsion test. Assume that the inner diameter is 0.375 in. and the outer diameter is 1.25 in., both
    14·1 answer
  • Cómo se llama el componente, que permite abrir o cerrar un circuito eléctrico
    8·1 answer
  • If a person runs a distance of 0.7 km in 3 min, what is his average speed in kilometres/hour ​
    7·1 answer
  • Un conejo puede recorrer una distancia de 90 m en 7 segundos .Cual es su velocidad?
    5·1 answer
  • Task Three :Write a C++ program to read temperature
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!