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 controller on an electronic arcade game consists of a variable resistor connected across the plates of a 0.227 μF capacitor. T
anyanavicka [17]

Answer:

R min = 28.173 ohm

R max = 1.55 × 10^{4}  ohm

Explanation:

given data

capacitor = 0.227 μF

charged to 5.03 V

potential difference across the plates =  0.833 V

handled effectively = 11.5 μs to 6.33 ms

solution

we know that resistance range of the resistor is express as

V(t) = V_o \times e^{t\RC}    ...........1

so R will be

R = \frac{t}{C\times ln(\frac{V_o}{V})}    ....................2

put here value

so for t min 11.5 μs

R = \frac{11.5}{0.227\times ln(\frac{5.03}{0.833})}

R min = 28.173 ohm

and

for t max 6.33 ms

R max = \frac{6.33}{11.5} \times 28.173  

R max = 1.55 × 10^{4}  ohm

4 0
2 years ago
Calculate the differential pressure in kPa across the hatch of a submarine 320m below the surface of the sea. Assume the atmosph
kicyunya [14]

Answer:

The pressure difference across hatch of the submarine is 3217.68 kpa.

Explanation:

Gauge pressure is the pressure above the atmospheric pressure. If we consider gauge pressure for finding pressure differential then no need to consider atmospheric pressure as they will cancel out. According to hydrostatic law, pressure varies in the z direction only.  

Given:

Height of the hatch is 320 m

Surface gravity of the sea water is 1.025.

Density of water 1000 kg/m³.

Calculation:

Step1

Density of sea water is calculated as follows:

S.G=\frac{\rho_{sw}}{\rho_{w}}

Here, density of sea water is\rho_{sw}, surface gravity is S.G and density of water is \rho_{w}.

Substitute all the values in the above equation as follows:

S.G=\frac{\rho_{sw}}{\rho_{w}}

1.025=\frac{\rho_{sw}}{1000}

\rho_{sw}=1025 kg/m³.

Step2

Difference in pressure is calculated as follows:

\bigtriangleup p=rho_{sw}gh

\bigtriangleup p=1025\times9.81\times320

\bigtriangleup p=3217680 pa.

Or

\bigtriangleup p=(3217680pa)(\frac{1kpa}{100pa})

\bigtriangleup p=3217.68 kpa.

Thus, the pressure difference across hatch of the submarine is 3217.68 kpa.

6 0
3 years ago
g A steel water pipe has an inner diameter of 12 in. and a wall thickness of 0.25 in. Determine the longitudinal and hoop stress
zvonat [6]

Answer:

a) \mathbf{\sigma _ 1 = 4800 psi}

     \mathbf{ \sigma _2 = 0}

b)\mathbf{\sigma _ 1 = 6000 psi}

  \mathbf{ \sigma _2 = 3000 psi}

Explanation:

Given that:

diameter d = 12 in

thickness t = 0.25 in

the radius = d/2 = 12 / 2 = 6 in

r/t = 6/0.25 = 24

24 > 10

Using the  thin wall cylinder formula;

The valve A is opened and the flowing water has a pressure P of 200 psi.

So;

\sigma_{hoop} = \sigma _ 1 = \frac{Pd}{2t}

\sigma_{long} = \sigma _2 = 0

\sigma _ 1 = \frac{Pd}{2t} \\ \\ \sigma _ 1 = \frac{200(12)}{2(0.25)}

\mathbf{\sigma _ 1 = 4800 psi}

b)The valve A is closed and the water pressure P is 250 psi.

where P = 250 psi

\sigma_{hoop} = \sigma _ 1 = \frac{Pd}{2t}

\sigma_{long} = \sigma _2 = \frac{Pd}{4t}

\sigma _ 1 = \frac{Pd}{2t} \\ \\ \sigma _ 1 = \frac{250*(12)}{2(0.25)}

\mathbf{\sigma _ 1 = 6000 psi}

\sigma _2 = \frac{Pd}{4t} \\ \\  \sigma _2 = \frac{250(12)}{4(0.25)}

\mathbf{ \sigma _2 = 3000 psi}

The free flow body diagram showing the state of stress on a volume element located on the wall at point B is attached in the diagram below

8 0
3 years ago
Which term represents an object that has a round or oval base and is connected at every point by lines at a corresponding point
raketka [301]

Answer:

it is a polyhedron

Explanation:

if I am wrong I am sorry

8 0
3 years ago
Read 2 more answers
On a average work day more than work place firs are reorted​
Basile [38]
What is the question? It looks like a statement...
8 0
3 years ago
Other questions:
  • The first step to merging is entering the ramp and _____.
    10·1 answer
  • A mysterious device found in a forgotten laboratory accumulates charge at a rate specified by the expression gm = 9 - 10tC from
    13·1 answer
  • If the compound swivel base is set on 60 degrees at the lathe centerline index, how many degrees will the reading be at the cros
    14·1 answer
  • DO NOW: Name the three main legal categories of ownership.
    12·1 answer
  • In your opinion, what is the external opportunity cost of a successful biking company in a community
    7·1 answer
  • A logic chip used in a computer dissipates 3 W of power in an environment at 120°F, and has a heat transfer surface area of 0.08
    11·1 answer
  • Part A What is the correct expression of the internal torque in segment AB? A shaft is fixed at A. A clockwise distributed torqu
    6·1 answer
  • Create a Relational Schema for the following scenario. Include all primary and foreign keys and list any assumptions you make. 
    15·1 answer
  • Define ways in which you would go about networking to explore opportunities in your career field and obtain more information for
    11·1 answer
  • Discuss importance of good communication system​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!