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
malfutka [58]
2 years ago
11

Output values below an amount

Computers and Technology
1 answer:
valina [46]2 years ago
7 0

Answer:

Explanation:

The following code is written in Python and it is a function called filter, which takes in the requested inputs. It then places the threshold in its own variable and pops it out of the array of inputs. Then it loops through the array comparing each element with the threshold and printing out all of the ones that are less than or equal to the threshold.

def filter():

   num_of_elements = input("Enter a number: ")

   count = 0

   arr_of_nums = []

   while count <= int(num_of_elements):

       arr_of_nums.append(input("Enter a number: "))

       count += 1

   threshold = arr_of_nums[-1]

   arr_of_nums.pop(-1)

   print(threshold)

   for element in arr_of_nums:

       if int(element) < int(threshold):

           print(element)

       else:

           continue

You might be interested in
Wich type of operating system is usually used in personal computers
Anvisha [2.4K]
The three most common operating systems for personal computers are Microsoft Windows, Apple Mac OS X, and Linux.
4 0
3 years ago
Read 2 more answers
As we move up a energy pyrimad the amount of a energy avaliable to each level of consumers
AleksandrR [38]

Explanation:

As it progresses high around an atmosphere, the amount of power through each tropic stage reduces. Little enough as 10% including its power is passed towards the next layer at every primary producers; the remainder is essentially wasted as heat by physiological activities.

8 0
3 years ago
Which type of network is the internet? choose the answer
Alex Ar [27]

Answer:

WAN or wide area network

Explanation:

The Internet is the most basic example of a WAN. It is connecting all computers together around the world.

5 0
3 years ago
Monica is writing a paper, and it needs to contain a certain amount of words. What Word Online feature can she use?IndentingProo
Greeley [361]

Answer:

Its word count so she knows how much words she is writing

Explanation:

7 0
2 years ago
Which structures protect the cell? Select two options.
Rzqust [24]

Answer:

cell wall

cell membrane

3 0
1 year ago
Other questions:
  • The set of appearance choices for files and folders is known as the
    7·1 answer
  • ​to prevent intrusions, companies install combinations of hardware and software called _____ to keep unauthorized web users from
    9·1 answer
  • What is the property of the Magnetic Lasso tool?
    6·2 answers
  • Double clicking a word selects the entire word?
    10·1 answer
  • Which is the process that a wireless router uses to translate a private ip address on internal traffic to a routable address for
    14·1 answer
  • Apple's macOS and Microsoft Windows are examples of ________ software. utility application communication operating system
    13·1 answer
  • ou use productivity apps on your iPad tablet device while traveling between client sites. You're concerned that you may lose you
    11·1 answer
  • Are you absent minded because you are thinking of an online activity?​
    12·1 answer
  • What are the tools in creating an animation?
    7·1 answer
  • How to fix a blue screen
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!