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
Which is a basic job requirement for a career in corrections services?
Diano4ka-milaya [45]

You must have a high school diploma

7 0
3 years ago
Juan is a network administrator and must set up a VPN for his company's network. To allow safe communication, he should
Mekhanik [1.2K]

Answer:

select Control Panel, then Network Protocols, then Internet

4 0
2 years ago
Why should a user preview the document before printing?​
Margarita [4]
The user should preview a document first to make sure the layout is correct, so as not to waste paper if a font size or layout is incorrect.
5 0
2 years ago
Read 2 more answers
Your computer uses 4 bits to represent decimal numbers (0, 1, 2, 3 and so on) in binary. What is the SMALLEST number for which a
natali 33 [55]
2 I think because 2 I think is binary I’m sorry if this is wrong
8 0
2 years ago
Which of the following statements is not true? Group of answer choices
Nesterboy [21]

Answer:

A

Explanation:

Option A is not true because a Boolean variable type can hold one of two values only that is  (true/True or false/False).

All the other options given in the question are correct because

  1. A variable declaration refers to specifying its type and name
  2. If string variables are assigned a numeric values which is legal provided the values are enclosed in quaotes( " "), trying to carryout a mathematical operation like addition will result in string concatenation.
  3. The Variable name I_Love_to_eat_pizza is legal because it contains no special characters, doesn't start with a number and its not a reserved word in any language
4 0
3 years ago
Other questions:
  • Ming is building an inexpensive computer to use for her online classes, and needs to purchase Windows. What is the most cost-eff
    8·1 answer
  • Wordwrap forces you to stop typing words and press the enter key at the end of each line.
    12·1 answer
  • In the game of economics, which player has the role of providing goods and services
    10·1 answer
  • Produce definition in computer
    12·2 answers
  • What are factors that limit a technological design
    11·2 answers
  • adding ______around calculations indicates which calculations should be performed first before following the typical order of op
    6·1 answer
  • Pleaseeeeeeeee I will give a brainliest
    7·1 answer
  • In series connection, if we have two symmetric devices connected with 10 V battery, voltage for each device will be.. .5V or 10V
    10·1 answer
  • Why are iterators useful?
    8·1 answer
  • [2]<br> (c) Describe how the microprocessor can determine when to sound the clock alarm.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!