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
jolli1 [7]
1 year ago
9

In Python write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs

the values of the list.
Ex: If the input is:

10
5
3
21
2
-6
the output is:

[10, 5, 3, 21, 2]

Code hints: while user_input >0: #This is the number that is greater than 0 from the list that is entered.

print(user_numbers) #Prints out the numbers greater than zero that are inputted at the top part.
Computers and Technology
1 answer:
Lilit [14]1 year ago
3 0

Answer:

ansList =input().split() #get input and split it by space

ansList = [int(i) for i in ansList if int(i)>0] #turn string to integer,and get all positive integers

print(ansList)

Explanation: I think this would work for you. I leace comments in the answer.

You might be interested in
What is the purpose of the operating system's processor management function?
Sloan [31]
The purpose of the operating system's processor management function is that it allows you to run multiple programs on your computer simultaneously. 
5 0
2 years ago
The _____ search algorithm searches a list for a given item, starting with the first element and continues to compare the item w
noname [10]

Answer:

Sequential

Explanation:

Based on the information provided within the question it can be said that the search algorithm that is being described in this scenario is a Sequential algorithm. This is because sequential programming focuses on programming (or in this case searching for) a result by doing one step at a time as opposed to various functions running simultaneously.

7 0
2 years ago
Skinner designed a soundproof apparatus, often equipped with a lever or bar, with which he conducted his experiments in operant
Jlenok [28]

Answer: Skinner box

Explanation: Skinner box is referred as the environment to conduct an experiment to observe the natural behavior of the element in a chamber. The Skinner box is also known as operant conditioning chamber. It is most commonly used for the experiments to be conducted with the animals in the operant conditioning chamber for the research purpose.

It is also soundproof tool and also refereed as the lever box as it contains lever .Thus the answer is Skinner box.

5 0
3 years ago
HELP PLZZ WILL MARK BRAINLIEST
adoni [48]

Answer:

if you could capture another image of this work bc I cant make out some words I can barley make out words

4 0
3 years ago
What do u call a individual that loves motor bikes and leather and is in a rival group known as mods?
vladimir1956 [14]
My best guess would be a biker they love motor bike they wear leather jackets and ride in groups this is the only thing i could think of

~ thanks ~
7 0
3 years ago
Other questions:
  • Which three phrases describe a wireframe
    12·1 answer
  • In your memo, give three new employees directions for starting the computer and opening a word-processing document.
    9·1 answer
  • The chemical symbol H represents which of the following elements?
    9·2 answers
  • How to block someone from watching your youtube videos?
    12·2 answers
  • According to the video, what education and experience do employers look for in Reporters and Correspondents? Check all that appl
    10·2 answers
  • Which option is the strongest password?
    7·2 answers
  • After reading the article, "The Impact of Technology", answer the following question.
    7·1 answer
  • What is text formatting?​
    5·2 answers
  • Recommend how could you integrate positive aspects of digital literacy into your own
    13·1 answer
  • WHICH PROGRAMMING LANGUAGES ARE THE BEST FOR PROGRAMMING?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!