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
wariber [46]
3 years ago
14

5.20 LAB: Output values below an amount Write a program that first gets a list of integers from input. The input begins with an

integer indicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value. Ex: If the input is: 5 50 60 140 200 75 100 the output is: 50,60,75,
Computers and Technology
1 answer:
Sveta_85 [38]3 years ago
6 0

Answer:

Following are the code to the given question:

x= input()#defining a variable x that inputs value from the user-end

l = x.split(" ")#defining variable l that splits the x variable value with a space

t= int(l[len(l)- 1])#defining a variable t that decrease the l length and convert the value into integer

for i in range(1, (len(l) - 1)):#use for loop to calculate the range of the list

      if int(l[i]) < t:#defining if block that checks the list value is lessthan t

          print(l[i])#print list values

Output:

Please find the attached file.

Explanation:

In the above-given code, an "x" variable is declared that inputs the value from the user-end, and use the "l" variable that splits all the value and defined a "t" variable that adds value into the list and convert the value into an integer.

In the next step, for loop is declared that counts the lists and use a conditional statement that checks list value is less than t and use the print the method that prints the list values.  

You might be interested in
1. Which markup language adds the ability to use video without requiring the user to download add-ons?
aniked [119]

HTML5

HTML5 has fewer plug-ins like the ability to standardize how audio and video are presented on a Web page. It introduces the <video> element designed to remove the need to install 3rd party add-ons and plug-ins like adobe flash player. It also adds the <audio> element  too that allows pages to smoothly add audio files.

3 0
3 years ago
A company that designs video games has decided to expand and needs to hire Software Developers, Web Administrators, and Computer
choli [55]
Collage graduates that are currently jobless or looking to apply for a jod
8 0
3 years ago
Read 2 more answers
How does the technology work
Ivan

Answer:  it does – or perhaps appears to do – in the world.

Explanation:

sorry if am not right have a nice day lol

6 0
3 years ago
Read 2 more answers
Identifiy the impact of new technology for your organizations <br>​
Len [333]

Answer:

1)The Sleepwalker Effect. This effect has several dimensions. ...

2)The Transparency Effect. ...

3)The Black Box Effect. ...

4)The Splintering Effect.

7 0
2 years ago
What is the most significant result based on the development of windmills and water wheels?
daser333 [38]
Power both wind mills and water wheels produced power which was used for textile factories ect
6 0
3 years ago
Other questions:
  • Which reading strategy refers to reading only the key words and phrases?
    13·2 answers
  • Which of the following is a goal of paraphrasing​
    12·1 answer
  • How can i promote netiquette??​
    10·1 answer
  • The piece of hardware that contains the circuitry that processes the information coming in to the computer and tells the other h
    8·1 answer
  • PLEASE HELP !!!! WILL UPVOTE
    5·2 answers
  • Which of the following is NOT an advantage to using inheritance?
    13·1 answer
  • A bastion host allows the firewall to connect to the internal network and the perimeter network.TrueFalse
    15·1 answer
  • Which branch of science helps avoid or minimize stress-related injuries at workplace?
    14·2 answers
  • During system testing, developers test the program in an environment that is very similar to how the program will eventually be
    11·2 answers
  • What is a reason for users and businesses to adopt 5G networks?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!