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
Calculate the number of telephone
olchik [2.2K]

Answer:

yho

Explanation:

hayi no ntwana.... lala boy

6 0
2 years ago
To a traditional computer, one means
blagie [28]

a.on , off

In most computer processors, electron movement is controlled by tiny switches that turn this flow of electricity on and off...zero represents off and one represents on

4 0
3 years ago
Edhesive assignment 7 calendar
ikadub [295]

Answer:

def leap_year(y):

 if y % 4 == 0:

     return 1

 else:

     return 0

def number_of_days(m,y):

 if m == 2:

     return 28 + leap_year(y)

 elif m == 1 or m == 3 or m == 5 or m == 7 or m == 8 or m ==10 or m == 12:

     return 31

 elif m == 4 or m == 6 or m == 9 or m == 11:

     return 30

def days(m,d):

 if m == 1:

     return 0 + d

 if m == 2:

     return 31 + d

 if m == 3:

     return 59 + d

 if m == 4:

     return 90 + d

 if m == 5:

     return 120 + d

 if m == 6:

     return 151 + d

 if m == 7:

     return 181 + d

 if m == 8:

     return 212 + d

 if m == 9:

     return 243 + d

 if m == 10:

     return 273 + d

 if m == 11:

     return 304 + d

 if m == 12:

     return 334 + d

def days_left(d,m,y):

 if days(m,d) <= 60:

     return 365 - days(m,d) + leap_year(y)

 else:

     return 365 - days(m,d)

print("Please enter a date")

day=int(input("Day: "))

month=int(input("Month: "))

year=int(input("Year: "))

choice=int(input("Menu:\n1) Calculate the number of days in the given month.\n2) Calculate the number of days left in the given year.\n"))

if choice == 1:

 print(number_of_days(month, year))

if choice == 2:

 print(days_left(day,month,year))

Explanation:

Hoped this helped

5 0
2 years ago
What command will unregister a component when run?
Advocard [28]
<span>Regsvr32.exe/u will unregister a component when run. Regsvr32.exe/u is a utility tool that is installed on Windows Xp or later versions of Windows. It has a 32-bit version and 64-bit version which can be found in the system root folder on a computer. It is capable of unregistering servers.</span>
7 0
3 years ago
Read 2 more answers
20<br>Calculate the kinette energy of a body the speed<br>that will be a mass tragm​
jolli1 [7]

Answer:

20

Explanation:

4 0
2 years ago
Other questions:
  • A(n) ___ operating system is a very fast, relatively small os. it is designed to respond to hardware and program requests almost
    6·1 answer
  • What is <br> Warehouse schema.
    14·1 answer
  • If 15 bits are sent in 3 seconds then Bits intervalis__________
    13·1 answer
  • An app builder wants to show groups as the last navigation menu item in the Salesforce1 mobile app. However, the app builder is
    8·1 answer
  • Your search google for recipe for tonight dinner is an.example of ?​
    8·2 answers
  • You are purchasing several PC systems that will be used as thin clients in a large organization. Which hardware selection criter
    9·1 answer
  • What is a benefit of starting a new business from scratch?
    8·1 answer
  • PLS HELP ME!! WILL GIVE BRAINLIEST
    7·2 answers
  • Do you know the energy unit question?
    10·1 answer
  • Help pweeze this is due today :(<br><br> I will give u brainliest just pweeze, I need this answer :(
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!