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
olga nikolaevna [1]
2 years ago
5

Write a program that first reads a list of 5 integers from input. Then, read another value from the input, and output all intege

rs less than or equal to that last value.
Ex: If the input is:

50 60 140 200 75 100
the output is:

50 60 75
For coding simplicity, follow every output value by a space, including the last one. Then, output a newline.

Such functionality is common on sites like Amazon, where a user can filter results. coral language, please
Computers and Technology
2 answers:
Makovka662 [10]2 years ago
8 0

Using the knowledge in python it is possible to write a code that uses the given values ​​to write its divisors.

<h3>Writing code in python:</h3>

<em>integer i</em>

<em>integer threshold</em>

<em>integer array(5) data</em>

<em>for i = 0; i < data.size; i = i + 1</em>

<em>   data[50, 60, 140, 200, 75, 100] = Get next input</em>

<em>threshold = Get next input</em>

<em>for i = 0; i < data.size; i = i + 1</em>

<em>   if data[50, 60, 140, 200, 75, 100] </em>

 

See more about python at brainly.com/question/18502436

#SPJ1

oksian1 [2.3K]2 years ago
6 0

Answer:

take user input element of list and print element of list whose value  are less than equal to last value of list

<u>Image 1: Input</u>

def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold):

      print("The integers that are less than or equal to", upper_threshold, "are:")

      for value in user_values:

             if value < upper_threshold:

                    print(value)

def get_user_values():

      n = int(input("Enter the number of integers in your list: ");

      1st = []

      print("Enter the", n, "integers:");

      for i in range(n):

             1st.append(int(input)

      return ist

if _name__ == '_main_':

userValues = get_user_values();

upperThreshold = int(userValues[-11), output ints less than or equal to threshold(userValues, upperThreshold)

<u>Image 1: Output</u>

Enter the number of integers in your list: 3 Enter the 3 integers:

10

50

20

The integers that are less than or equal to 20 are:

10

You might be interested in
In python please!! Write the definition of a function named countPos that needs integer values from standard input until there a
jek_recluse [69]

Answer:

Explanation:

The following code is written in Python it doesn't use any loops, instead it uses a recursive function in order to continue asking the user for the inputs and count the number of positive values. If anything other than a number is passed it automatically ends the program.

def countPos(number=input("Enter number: "), counter=0):

   try:

       number = int(number)

       if number > 0:

           counter += 1

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

       else:

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

   except:

       print(counter)

       print("Program Finished")

countPos()

8 0
3 years ago
What is an IF statement used for?
kiruha [24]

The IF statement is a decision-making statement that guides a program to make decisions based on specified criteria. The IF statement executes one set of code if a specified condition is met (TRUE) or another set of code evaluates to FALSE.

8 0
2 years ago
You recently started working part-time in a retail store, and are learning about the reading devices your store uses.Your store
slega [8]

Answer:

Laser beams.

Explanation:

Recently, that user has began functioning part-time in such a retail outlet, as well as he discovering regarding his shop's learning tools. During checkout, his shop requires the code scanner to scan objects.  

The barcode scanner uses laser beam technologies because the laser beam is rapidly running over the QR code or barcode back-and-forth, or executing the sequence. The sensors well into the system display the mirrored beam patterns that decrypts the barcode.

So, the following are the reason that describes the answer is correct according to the scenario.

5 0
3 years ago
You are responsible for creating a shared file system to support a new branch office. The manager has requested shared locations
Natalija [7]

Answer:

Hey do u hve zoo m app??......

5 0
3 years ago
What number will be output by the console.log command on line 5?
bagirrra123 [75]

Answer:

The output is 35

Explanation:

Required

Determine the output on line 5

We start by analysing the program line by line.

On line 1: kit = 20

On line 2: roo = 10

On line 3: kit = kit + 5

Substitute 20 for kit.

So, we have

kit = 20 + 5

kit = 25

On line 4:

roo = kit + roo

Substitute values for kit and too

roo = 25 + 10

roo = 35

On line 5: Output roo

So, 35 is displayed as an output

4 0
3 years ago
Other questions:
  • Pointsfor a failover cluster, what type of network would you use to communicate with an iscsi device?
    15·1 answer
  • In the game Beehive, you play the role of a worker bee who must watch over her hive. Your duties include (among others) directin
    12·2 answers
  • Hey I don’t have a question I’m just testing something on this app
    6·2 answers
  • Once a virus has been removed by your anti-virus program, all traces of it are gone from your computer.
    9·1 answer
  • Explain what middleware is. Name a common middleware in two-tier client/server architecture for database applications.
    10·1 answer
  • Explain three specific &amp; major security threats to internet users. In each case, address whether or not the vulnerabilities
    15·1 answer
  • Kos-huar-utb garls jonly​
    8·2 answers
  • TRUE OR FALSE: THE BUILDER'S CLUB IS A PAID SUBSCRIPTION.
    9·2 answers
  • Which part of the brain controls the movement of muscles​
    6·1 answer
  • Write a program that first reads a list of 5 integers from input. Then, read another value from the input, and output all intege
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!